@@ -22,6 +22,7 @@ There is a development wiki here on GitHub: https://github.com/ParsePlatform/par
2222* cloud - The absolute path to your cloud code main.js file
2323* fileKey - For migrated apps, this is necessary to provide access to files already hosted on Parse.
2424* facebookAppIds - An array of valid Facebook application IDs.
25+ * serverURL - URL which will be used by Cloud Code functions to make requests against.
2526
2627#### Client key options:
2728
@@ -49,14 +50,17 @@ var ParseServer = require('parse-server').ParseServer;
4950
5051var app = express ();
5152
53+ var port = process .env .PORT || 1337 ;
54+
5255// Specify the connection string for your mongodb database
5356// and the location to your Parse cloud code
5457var api = new ParseServer ({
5558 databaseURI: ' mongodb://localhost:27017/dev' ,
5659 cloud: ' /home/myApp/cloud/main.js' , // Provide an absolute path
5760 appId: ' myAppId' ,
5861 masterKey: ' mySecretMasterKey' ,
59- fileKey: ' optionalFileKey'
62+ fileKey: ' optionalFileKey' ,
63+ serverURL: ' http://localhost:' + port + ' /parse' // Don't forget to change to https if needed
6064});
6165
6266// Serve the Parse API on the /parse URL prefix
@@ -67,7 +71,6 @@ app.get('/', function(req, res) {
6771 res .status (200 ).send (' Express is running here.' );
6872});
6973
70- var port = process .env .PORT || 1337 ;
7174app .listen (port, function () {
7275 console .log (' parse-server-example running on port ' + port + ' .' );
7376});
0 commit comments