Name: parse-server-example
Owner: CodePath
Description: Example server using Express and the parse-server module.
Forked from: parse-community/parse-server-example
Created: 2016-02-10 08:44:16.0
Updated: 2018-05-06 18:43:15.0
Pushed: 2018-05-06 18:43:14.0
Homepage: null
Size: 42
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Example project using the parse-server module on Express.
Read the full server guide here: https://parse.com/docs/server/guide
node --version
npm install
mongo
to connect to your database, just to make sure it's working. Once you see a mongo prompt, exit with Control-Dnpm start
export PARSE_MOUNT=/1
before launching the server.heroku create
heroku addons:create mongolab:sandbox
heroku config:set PARSE_MOUNT=/1
git push heroku master
eb init
eb create --envvars DATABASE_URI=<replace with URI>,APP_ID=<replace with Parse app ID>,MASTER_KEY=<replace with Parse master key>
A detailed tutorial is available here: Azure welcomes Parse developers
scalingo create my-parse
scalingo addons-add scalingo-mongodb free
scalingo env-set DATABASE_URI='$SCALINGO_MONGO_URL'
scalingo env-set PARSE_MOUNT=/1
git push scalingo master
You can use the REST API, the JavaScript SDK, and any of our open-source SDKs:
Example request to a server running locally:
-X POST \
"X-Parse-Application-Id: myAppId" \
"Content-Type: application/json" \
'{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
tp://localhost:1337/parse/classes/GameScore
-X POST \
"X-Parse-Application-Id: myAppId" \
"Content-Type: application/json" \
'{}' \
tp://localhost:1337/parse/functions/hello
Example using it via JavaScript:
e.initialize('myAppId','unused');
e.serverURL = 'https://whatever.herokuapp.com';
obj = new Parse.Object('GameScore');
set('score',1337);
save().then(function(obj) {
nsole.log(obj.toJSON());
r query = new Parse.Query('GameScore');
ery.get(obj.id).then(function(objAgain) {
console.log(objAgain.toJSON());
function(err) {console.log(err); });
unction(err) { console.log(err); });
You can change the server URL in all of the open-source SDKs, but we're releasing new builds which provide initialization time configuration of this property.