Skip to content

iokloud/iok-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paraffin-api-server

Paraffin api server using the parse-server module on Express.

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

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 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 /api 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 "paraffin" that contains your Parse data
  • Install ngrok and you can test with devices

Using it

Before using it, you can access a test page to verify if the basic setup is working fine http://localhost:1337/test. 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: APP_ID" \
  -H "Content-Type: application/json" \
  -d '{}' \
  http://localhost:1337/api/functions/hello