Giter Site home page Giter Site logo

parse-server-example's Introduction

Azure parse-server-example

Example project using the parse-server module on Express.

Read the full server guide here: https://parse.com/docs/server/guide

Deploy to Azure

For Local Development

  • 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

Getting Started With Azure App Service + Mongolab Development

A detailed guide on how to create a site and deploy the Parse server is provided here: [URL]

Using it

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: myAppId" \
  -H "Content-Type: application/json" \
  -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
  http://localhost:1337/parse/classes/GameScore
  
curl -X POST \
  -H "X-Parse-Application-Id: myAppId" \
  -H "Content-Type: application/json" \
  -d '{}' \
  http://localhost:1337/parse/functions/hello

Example using it via JavaScript:

Parse.initialize('myAppId','unused');
Parse.serverURL = 'https://whatever.herokuapp.com';
var obj = new Parse.Object('GameScore');
obj.set('score',1337);
obj.save().then(function(obj) {
  console.log(obj.toJSON());
  var query = new Parse.Query('GameScore');
  query.get(obj.id).then(function(objAgain) {
    console.log(objAgain.toJSON());
  }, function(err) {console.log(err); });
}, function(err) { console.log(err); });

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.

parse-server-example's People

Contributors

christopheranderson avatar fabiocav avatar gfosco avatar moflo avatar paulbatum avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.