Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Hosting Parse Server on Pivotal Web Services

License

Notifications You must be signed in to change notification settings

vmware-archive/pws-parse-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pws-parse-server is no longer actively maintained by VMware.

Hosting Parse Server on Pivotal Web Services

This is an example on how to deploy Parse Server on Pivotal Web Services.

Deploy

Setup the environment

  • Set Up Your PWS Account (if you don’t have one already)
  • Install the cf CLI
  • Login into PWS and select an org and space:
cf login api.run.pivotal.io

Deploy the Parse Server

Clone this repository to your local workstation and deploy it to PWS:

git clone https://github.com/cf-platform-eng/pws-parse-server
cd pws-parse-server
cf push

Live Query Support

If you wish to use Parse's Live Query feature (e.g., for real-time updates in your application), update server.js with an array indicating the classes for which you would like Live Query support, and create a new instance of the LiveQueryServer object.

var parseServer = new ParseServer({
  ...
  liveQuery: {
    classNames: ["Friends", "Photos"] // List of classes to support for query subscriptions
  }
});

...

var parseLiveQueryServer = ParseServer.createLiveQueryServer(server); // where server is your Express application.

In your client Parse application, specify the URL of your Parse Live Query server, making sure to use the wss protocol and specifying 4443 as the port.

Parse.liveQueryServerURL = 'wss://your-server-url.cfapps.io:4443';

MongoDB backend

Parse Server uses MongoDB as the backend database, so we will need to create a MongoDB database using the PWS service's marketplace and bind it to the application:

cf create-service mongolab sandbox parse-mongodb
cf bind-service parse-server parse-mongodb
cf restage parse-server

Test the Parse Server

Call the Parse Server Cloud function using the REST API:

curl -X POST \
  -H "X-Parse-Application-Id: APP-ID" \
  -H "X-Parse-REST-API-Key: MASTER-KEY" \
  -H "Content-Type: application/json" \
  -d '{}' http://parse-server-<random word>.cfapps.io/parse/functions/hello

Note: replace parse-server-<random word>.cfapps.io with the URL assigned to your application.

Copyright

Copyright (c) 2016 Pivotal Software Inc. See LICENSE for details.

About

Hosting Parse Server on Pivotal Web Services

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •