@@ -18,6 +18,7 @@ There is a development wiki here on GitHub: https://github.com/ParsePlatform/par
18
18
* cloud - The absolute path to your cloud code main.js file
19
19
* fileKey - For migrated apps, this is necessary to provide access to files already hosted on Parse.
20
20
* facebookAppIds - An array of valid Facebook application IDs.
21
+ * serverURL - URL which will be used by Cloud Code functions to make requests against.
21
22
22
23
#### Client key options:
23
24
@@ -45,14 +46,17 @@ var ParseServer = require('parse-server').ParseServer;
45
46
46
47
var app = express ();
47
48
49
+ var port = process .env .PORT || 1337 ;
50
+
48
51
// Specify the connection string for your mongodb database
49
52
// and the location to your Parse cloud code
50
53
var api = new ParseServer ({
51
54
databaseURI: ' mongodb://localhost:27017/dev' ,
52
55
cloud: ' /home/myApp/cloud/main.js' , // Provide an absolute path
53
56
appId: ' myAppId' ,
54
57
masterKey: ' mySecretMasterKey' ,
55
- fileKey: ' optionalFileKey'
58
+ fileKey: ' optionalFileKey' ,
59
+ serverURL: ' http://localhost:' + port + ' /parse' // Don't forget to change to https if needed
56
60
});
57
61
58
62
// Serve the Parse API on the /parse URL prefix
@@ -63,7 +67,6 @@ app.get('/', function(req, res) {
63
67
res .status (200 ).send (' Express is running here.' );
64
68
});
65
69
66
- var port = process .env .PORT || 1337 ;
67
70
app .listen (port, function () {
68
71
console .log (' parse-server-example running on port ' + port + ' .' );
69
72
});
0 commit comments