/linum-parse

Example server using Express and the parse-server module.

Primary LanguageJavaScript

parse-server-example

Join The Conversation Backers on Open Collective Sponsors on Open Collective License Twitter Follow

Example project using the parse-server module on Express. Read the full Parse Server Guide for more information.

Remote Deployment

Heroku

Deploy

Using Parse Server

Health Check

You can use the /health endpoint to verify that Parse Server is up and running. For example, for local deployment, enter this URL in your browser:

http://localhost:1337/parse/health

If you deployed Parse Server remotely, change the URL accordingly.

APIs and SDKs

Use the REST API, GraphQL API or any of the Parse SDKs to see Parse Server in action. Parse Server comes with a variety of SDKs to cover most common ecosystems and languages, such as JavaScript, Swift, ObjectiveC and Android just to name a few.

The following shows example requests when interacting with a local deployment of Parse Server. If you deployed Parse Server remotely, change the URL accordingly.

REST API

Save object:

curl -X POST \
  -H "X-Parse-Application-Id: YOUR_APP_ID" \
  -H "Content-Type: application/json" \
  -d '{"score":1337}' \
  http://localhost:1337/parse/classes/GameScore

Call Cloud Code function:

curl -X POST \
  -H "X-Parse-Application-Id: YOUR_APP_ID" \
  -H "Content-Type: application/json" \
  -d "{}" \
  http://localhost:1337/parse/functions/hello

JavaScript

// Initialize SDK
Parse.initialize("YOUR_APP_ID", "unused");
Parse.serverURL = 'http://localhost:1337/parse';

// Save object
const obj = new Parse.Object('GameScore');
obj.set('score',1337);
await obj.save();

// Query object
const query = new Parse.Query('GameScore');
const objAgain = await query.get(obj.id);

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.