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