Skip to content

Commit

Permalink
Add server url
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerhu committed Feb 25, 2016
1 parent ab4e723 commit b9550a1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .ebextensions/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ option_settings:
MASTER_KEY: "ReplaceWithMasterKey"
DATABASE_URI: "ReplaceWithDatabaseURI"
NODE_ENV: "production"

SERVER_URL: "http://myappname.elasticbeanstalk.com/parse"
aws:elasticbeanstalk:container:nodejs:
NodeCommand: "npm start"
4 changes: 4 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"MASTER_KEY": {
"description": "A key that overrides all permissions. Keep this secret.",
"value": "myMasterKey"
},
"SERVER_URL": {
"description": "URL of your Heroku instance",
"value": "http://myapp.herokuapp.com/parse"
}
},
"image": "heroku/nodejs",
Expand Down
11 changes: 10 additions & 1 deletion azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
"minLength": 1,
"defaultValue": "myMasterKey"
},
"parseServerUrl": {
"type": "string",
"minLength": 1,
"defaultValue": "http://yourappname.azure.com/parse"
},
"repoURL": {
"type": "string",
"defaultValue": "https://github.com/parseplatform/parse-server-example.git",
Expand Down Expand Up @@ -109,6 +114,10 @@
"name": "MASTER_KEY",
"value": "[parameters('parseMasterKey')]"
},
{
"name": "SERVER_URL",
"value": "[parameters('parseServerUrl')]"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "4.2.3"
Expand All @@ -132,4 +141,4 @@
]
}
]
}
}
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || 'myAppId',
masterKey: process.env.MASTER_KEY || '' //Add your master key here. Keep it secret!
masterKey: process.env.MASTER_KEY || '', //Add your master key here. Keep it secret!
serverUrl: process.env.SERVER_URL || 'http://localhost:1337' // Don't forget to change to https if needed
});
// Client-keys like the javascript key or the .NET key are not necessary with parse-server
// If you wish you require them, you can set them as options in the initialization above:
Expand Down

0 comments on commit b9550a1

Please sign in to comment.