Skip to content

Our own parse server using Express and the parse-server module.

Notifications You must be signed in to change notification settings

truffls/parse-server

This branch is 27 commits ahead of, 154 commits behind parse-community/parse-server-example:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

07e5de0 · Nov 2, 2020
Nov 2, 2020
Jan 28, 2016
Jul 9, 2018
Jul 9, 2018
Oct 18, 2019
Oct 18, 2019
Oct 18, 2019
Oct 18, 2019
Jan 28, 2016
Nov 2, 2020
Nov 2, 2020

Repository files navigation

parse-server

Truffls project using the parse-server module on Express.

Read the full Parse Server guide here: https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide

Upgrading the mongo db scheme

When upgrading from the original mongo db dump to the latest parse server version, you have to delete some indexes, otherwise you will face some errors on startup. Connect to the correct mongo db and there run:

db.getCollection("_Role").dropIndex("name_1")
db.getCollection("_Audience").dropIndex("name_1")
db.getCollection("_User").dropIndex("username_1")
db.getCollection("_User").dropIndex("email_1")

For Local Development

  • Make sure you have at least Node 4.3. node --version
  • Clone this repo and change directory to it.
  • npm install
  • Install mongo locally
  • Run mongo to connect to your database, just to make sure it's working. Once you see a mongo prompt, exit with Control-D
  • Run the server with: npm start
  • By default it will use a path of /parse for the API routes. To change this, or use older client SDKs, run export PARSE_MOUNT=/1 before launching the server.
  • You now have a database named "dev" that contains your Parse data
  • Install ngrok and you can test with devices

Getting Started With AWS Elastic Beanstalk

Without It

  • Clone the repo and change directory to it
  • Log in with the AWS Elastic Beanstalk CLI, select a region, and create an app: eb init
  • Create an environment and pass in MongoDB URI, App ID, and Master Key:
eb create --envvars DATABASE_URI=<replace with URI>,APP_ID=<replace with Parse app ID>,MASTER_KEY=<replace with Parse master key>
  • Deploy:
eb deploy <environment_name>

Using it

Before using it, you can access a test page to verify if the basic setup is working fine http://localhost:1337/. Then you can use the REST API, the JavaScript SDK, and any of our open-source SDKs:

Example request to a server running locally:

curl -X POST \
  -H "X-Parse-Application-Id: myAppId" \
  -H "Content-Type: application/json" \
  -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
  http://localhost:1337/parse/classes/GameScore
  
curl -X POST \
  -H "X-Parse-Application-Id: myAppId" \
  -H "Content-Type: application/json" \
  -d '{}' \
  http://localhost:1337/parse/functions/hello

About

Our own parse server using Express and the parse-server module.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.8%
  • Dockerfile 4.2%