Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ Configuration is located in `config.ts`.

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

The deploy button reads `app.json` and prompts for the required configuration. Heroku no longer offers the retired mLab add-on used by older versions of this example, so create a MongoDB database first and paste its connection string into `DATABASE_URI` when Heroku asks for config vars. After selecting your Heroku app name, update `SERVER_URL` to match it, for example `https://yourappname.herokuapp.com/parse`.

Alternatively, to deploy manually:

* Clone the repo and change directory to it
* Log in with the [Heroku Toolbelt](https://toolbelt.heroku.com/) and create an app: `heroku create`
* Use the [mLab addon](https://elements.heroku.com/addons/mongolab): `heroku addons:create mongolab:sandbox --app YourAppName`
* Create a MongoDB database and set its connection string: `heroku config:set DATABASE_URI=<replace with MongoDB connection string> --app YourAppName`
* By default it will use a path of /parse for the API routes. To change this, or use older client SDKs, run `heroku config:set PARSE_MOUNT=/1`
* Deploy it with: `git push heroku master`

Expand Down
16 changes: 9 additions & 7 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "Parse Server Example",
"description": "An example Parse API server using the parse-server module",
"repository": "https://github.com/ParsePlatform/parse-server-example",
"repository": "https://github.com/parse-community/parse-server-example",
"logo": "https://avatars0.githubusercontent.com/u/1294580?v=3&s=200",
"keywords": ["node", "express", "parse"],
"env": {
"DATABASE_URI": {
"description": "MongoDB connection string for Parse Server. Create a MongoDB database before deploying and paste its connection string here.",
"required": true
},
"PARSE_MOUNT": {
"description": "Configure Parse API route.",
"value": "/parse"
Expand All @@ -15,13 +19,11 @@
},
"MASTER_KEY": {
"description": "A key that overrides all permissions. Keep this secret.",
"value": "myMasterKey"
"generator": "secret"
},
"SERVER_URL": {
"description": "URL to connect to your Heroku instance (update with your app's name + PARSE_MOUNT)",
"value": "http://yourappname.herokuapp.com/parse"
"description": "Public URL to connect to your Heroku instance. Update this after choosing the app name, for example: https://yourappname.herokuapp.com/parse",
"value": "https://yourappname.herokuapp.com/parse"
}
},
"image": "heroku/nodejs",
"addons": ["mongolab"]
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"lint": "eslint --cache .",
"lint-fix": "eslint --cache --fix .",
"prettier": "prettier --write '{cloud,spec}/{**/*,*}.{ts,js,mjs,cjs}' index.ts",
"heroku-postbuild": "npm run build",
"start": "node dist/index.js",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=7.0.1} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017",
"test": "TESTING=true tsx node_modules/jasmine/bin/jasmine",
Expand Down