Skip to content

Commit 017437d

Browse files
committed
Merge pull request yongjhih#75 from rogerhu/server_url
Add server url
2 parents ab4e723 + b9550a1 commit 017437d

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

.ebextensions/app.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ option_settings:
55
MASTER_KEY: "ReplaceWithMasterKey"
66
DATABASE_URI: "ReplaceWithDatabaseURI"
77
NODE_ENV: "production"
8-
8+
SERVER_URL: "http://myappname.elasticbeanstalk.com/parse"
99
aws:elasticbeanstalk:container:nodejs:
1010
NodeCommand: "npm start"

app.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
"MASTER_KEY": {
1717
"description": "A key that overrides all permissions. Keep this secret.",
1818
"value": "myMasterKey"
19+
},
20+
"SERVER_URL": {
21+
"description": "URL of your Heroku instance",
22+
"value": "http://myapp.herokuapp.com/parse"
1923
}
2024
},
2125
"image": "heroku/nodejs",

azuredeploy.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
"minLength": 1,
4545
"defaultValue": "myMasterKey"
4646
},
47+
"parseServerUrl": {
48+
"type": "string",
49+
"minLength": 1,
50+
"defaultValue": "http://yourappname.azure.com/parse"
51+
},
4752
"repoURL": {
4853
"type": "string",
4954
"defaultValue": "https://github.com/parseplatform/parse-server-example.git",
@@ -109,6 +114,10 @@
109114
"name": "MASTER_KEY",
110115
"value": "[parameters('parseMasterKey')]"
111116
},
117+
{
118+
"name": "SERVER_URL",
119+
"value": "[parameters('parseServerUrl')]"
120+
},
112121
{
113122
"name": "WEBSITE_NODE_DEFAULT_VERSION",
114123
"value": "4.2.3"
@@ -132,4 +141,4 @@
132141
]
133142
}
134143
]
135-
}
144+
}

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ var api = new ParseServer({
1414
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
1515
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
1616
appId: process.env.APP_ID || 'myAppId',
17-
masterKey: process.env.MASTER_KEY || '' //Add your master key here. Keep it secret!
17+
masterKey: process.env.MASTER_KEY || '', //Add your master key here. Keep it secret!
18+
serverUrl: process.env.SERVER_URL || 'http://localhost:1337' // Don't forget to change to https if needed
1819
});
1920
// Client-keys like the javascript key or the .NET key are not necessary with parse-server
2021
// If you wish you require them, you can set them as options in the initialization above:

0 commit comments

Comments
 (0)