All Projects → parse-community → Parse Server Example

parse-community / Parse Server Example

Example server using Express and the parse-server module.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Parse Server Example

Parse Dashboard
A dashboard for managing your Parse Server Apps
Stars: ✭ 3,534 (+95.57%)
Mutual labels:  parse-server, parse-platform
content-moderation-image-api
An NSFW Image Classification REST API for effortless Content Moderation built with Node.js, Tensorflow, and Parse Server
Stars: ✭ 50 (-97.23%)
Mutual labels:  parse-server, parse-platform
Parse Server
API server module for Node/Express
Stars: ✭ 19,165 (+960.6%)
Mutual labels:  parse-server, parse-platform
parse-server-test-runner
A tool for programmatically starting Parse Server
Stars: ✭ 18 (-99%)
Mutual labels:  parse-server
ParseFacebookUtils-iOS
A set of utilities to integrate Facebook with the Parse iOS/tvOS SDK.
Stars: ✭ 92 (-94.91%)
Mutual labels:  parse-platform
parse-cloud-class
Extendable way to set up Parse Cloud classes behaviour
Stars: ✭ 40 (-97.79%)
Mutual labels:  parse-server
Snowflake
❄️ A React-Native Android iOS Starter App/ BoilerPlate / Example with Redux, RN Router, & Jest with the Snowflake Hapi Server running locally or on RedHat OpenShift for the backend, or a Parse Server running locally or remotely on Heroku
Stars: ✭ 4,576 (+153.24%)
Mutual labels:  parse-server
AmbulanceLocator
Ambulance Locator lets the user find nearby ambulances and as well as call the nearby ambulances.
Stars: ✭ 15 (-99.17%)
Mutual labels:  parse-server
Parse Sdk Ios Osx
The Objective-C iOS | macOS | watchOS | tvOS SDK for the Parse Platform
Stars: ✭ 2,788 (+54.29%)
Mutual labels:  parse-platform
parse-server-gcs-adapter
parse-server adapter for Google Cloud Storage
Stars: ✭ 26 (-98.56%)
Mutual labels:  parse-server
parse-stack
Parse Server Ruby Client SDK
Stars: ✭ 59 (-96.73%)
Mutual labels:  parse-server
node-apn
Apple Push Notification module for Node.js
Stars: ✭ 128 (-92.92%)
Mutual labels:  parse-server
parse-server-simple-mailgun-adapter
Used to send Parse Server password reset and email verification emails though Mailgun
Stars: ✭ 81 (-95.52%)
Mutual labels:  parse-server
parse-react
[EXPERIMENTAL] React, React Native, and React with SSR (e.g. Next.js) packages to interact with Parse Server backend
Stars: ✭ 58 (-96.79%)
Mutual labels:  parse-server
docker-parse-mongo
Parse Server with MongoDB ReplicaSet using Docker (for AWS EC2 or GCP GCE)
Stars: ✭ 27 (-98.51%)
Mutual labels:  parse-server
snowflake
A React-Native Android iOS Starter App/ BoilerPlate / Example with Redux, RN Router, & Jest with the Snowflake Hapi Server running locally or on RedHat OpenShift for the backend, or a Parse Server running locally or remotely on Heroku
Stars: ✭ 13 (-99.28%)
Mutual labels:  parse-server
benchmark
Parse Server Continuous Benchmark
Stars: ✭ 21 (-98.84%)
Mutual labels:  parse-server
Parse Sdk Android
The Android SDK for the Parse Platform
Stars: ✭ 1,806 (-0.06%)
Mutual labels:  parse-platform
parse server dart
Parse Server SDK for dart and flutter
Stars: ✭ 25 (-98.62%)
Mutual labels:  parse-server
CareKitSample-ParseCareKit
An example application of CareKit's OCKSample synchronizing iOS and watchOS to the cloud via ParseCareKit and parse-hipaa
Stars: ✭ 18 (-99%)
Mutual labels:  parse-server

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.

Table of Contents

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 using http://docs.mongodb.org/master/tutorial/install-mongodb-on-os-x/
  • 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

Helpful Scripts

These scripts can help you to develop your app for Parse Server:

  • npm run watch will start your Parse Server and restart if you make any changes.
  • npm run lint will check the linting of your cloud code, tests and index.js, as defined in .eslintrc.json.
  • npm run lint-fix will attempt fix the linting of your cloud code, tests and index.js.
  • npm run prettier will help improve the formatting and layout of your cloud code, tests and index.js, as defined in .prettierrc.
  • npm run test will run any tests that are written in /spec.
  • npm run coverage will run tests and check coverage. Output is available in the /coverage folder.

Remote Deployment

Heroku

Deploy

Alternatively, to deploy manually:

  • Clone the repo and change directory to it
  • Log in with the Heroku Toolbelt and create an app: heroku create
  • Use the mLab addon: heroku addons:create mongolab:sandbox --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

AWS Elastic Beanstalk

Alternatively, deploy your local changes manually:

  • 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>

Microsoft Azure App Service

Deploy to Azure

Detailed information is available here:

Google App Engine

  1. Clone the repo and change directory to it
  2. Create a project in the Google Cloud Platform Console.
  3. Enable billing for your project.
  4. Install the Google Cloud SDK.
  5. Setup a MongoDB server. You have a few options:
  6. Create a Google Compute Engine virtual machine with MongoDB pre-installed.
  7. Use mLab to create a free MongoDB deployment on Google Cloud Platform (only US-central).
  8. Modify app.yaml to update your environment variables.
  9. Delete Dockerfile
  10. Deploy it with gcloud preview app deploy

A detailed tutorial is available here: Running Parse server on Google App Engine

Scalingo

Deploy to Scalingo

Alternatively, to deploy manually:

  • Clone the repo and change directory to it
  • Log in with the Scalingo CLI and create an app: scalingo create my-parse
  • Use the Scalingo MongoDB addon: scalingo addons-add scalingo-mongodb free
  • Setup MongoDB connection string: scalingo env-set DATABASE_URI='$SCALINGO_MONGO_URL'
  • By default it will use a path of /parse for the API routes. To change this, or use older client SDKs, run scalingo env-set PARSE_MOUNT=/1
  • Deploy it with: git push scalingo master

OpenShift Online (Next Gen)

  1. Register for a free OpenShift Online (Next Gen) account
  2. Create a project in the OpenShift Online Console.
  3. Install the OpenShift CLI.
  4. Add the Parse Server template to your project: oc create -f https://raw.githubusercontent.com/ParsePlatform/parse-server-example/master/openshift.json
  5. Deploy Parse Server from the web console
  6. Open your project in the OpenShift Online Console:
  7. Click Add to Project from the top navigation
  8. Scroll down and select NodeJS > Parse Server
  9. (Optionally) Update the Parse Server settings (parameters)
  10. Click Create

A detailed tutorial is available here: Running Parse Server on OpenShift Online (Next Gen)

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);

Android

// Initialize SDK in the application class
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
  .applicationId("YOUR_APP_ID")
  .server("http://localhost:1337/parse/")   // '/' important after 'parse'
  .build());

// Save object
ParseObject obj = new ParseObject("TestObject");
obj.put("foo", "bar");
obj.saveInBackground();

iOS / tvOS / iPadOS / macOS (Swift)

// Initialize SDK in AppDelegate
Parse.initializeWithConfiguration(ParseClientConfiguration(block: {
  (configuration: ParseMutableClientConfiguration) -> Void in
    configuration.server = "http://localhost:1337/parse/" // '/' important after 'parse'
    configuration.applicationId = "YOUR_APP_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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].