The Database Hub | Back4App
The Database Hub | Back4App
How it works
  • Log In
  • Sign Up

  1. Back4App
  2. Parse
Public

16
308
16
308
  • DatabaseDatabase
  • GraphQL API PlaygroundAPI Playground
  • Get Started GuideGet Started
  • IssuesIssues
  • ContributorsContributors
  • GraphQL API Playground
    API Playground
    Get Started Guide
    Get Started
    Issues
    Issues
    Contributors
    Contributors

  1. Parse
  2. Parse_Server_Usage

Parse Server is designed to be mounted on an Express application that is a web framework for Node.js.


DataSchema
Get StartedFetch Data
ACLcreatedAtobjectIdupdatedAt
There is no data in this class.
NotesNotes

Parse Server Usage

Parse server has been designed to be mounted on an express application, which is a web-based framework for Node.js. While, the simplest way to get started with this is by cloning the parse server repo, which is containing a sample Express application at its root with a mounted parse API. The constructer will return an API object which will confirm an Express middleware. Then this object will bring REST endpoints for your parse application.

Follow the following method to create an instance

var api = new ParseServer({
  databaseURI: 'mongodb://your.mongo.uri',
  cloud: './cloud/main.js',
  appId: 'myAppId',
  fileKey: 'myFileKey',
  masterKey: 'mySecretMasterKey',
  push: { ... }, // See the Push wiki page
  filesAdapter: ...,
});

Parameters Parameters here are as:

  • Connection string for Mongo DB: databaseURI
  • Path to the cloud code of your app: cloud
  • Identifier for your application: appId
  • Key to specify the prefix which is being used for your file storage: fileKey
  • A key which can override entire permissions: masterKey
  • Application’s client key: clientKey
  • Your application’s REST key: restAPIKey
  • Your application’s .NET key: dotNetKey
  • Your application’s JavaScript key: javascriptKey
  • Push configuration containing object: push
  • Object implementing file adapter interface: filesAdapter
  • Third-party configuration support: auth
  • Maximum size of a file upload: MaxUploadSize The object of parse server has been built to be passed into app.use directly, which can mount Parse API in your Express application at a specified path. var express = require('express'); var ParseServer = require('parse-server').ParseServer;
var app = express();
var api = new ParseServer({ ... });

// Serve the Parse API at /parse URL prefix
app.use('/parse', api);

var port = 1337;
app.listen(port, function() {
  console.log('parse-server-example running on port ' + port + '.');
});

This will let you have a parse server which is running on the port 1337 while service Parse API at /parse.