Giter Club home page Giter Club logo

openshift-parse-server's Introduction

Running a Parse Server on OpenShift

This code will get you up and running on OpenShift with the Parse Server.

Steps to get running

Create an account at http://openshift.redhat.com/

Create a namespace

rhc domain create <yournamespace>

Create a nodejs application (you can name it anything via -a)

rhc app create -a parseserver -t nodejs-0.10

Add the github nodejs-custom-version-openshift repository

cd parseserver
git remote add upstream -m master git://github.com/ramr/nodejs-custom-version-openshift.git
git pull -s recursive -X theirs upstream master

Optionally, specify the custom version of Node.js you want to run with (Default is v4.2.3). If you want to more later version of Node (example v4.2.42), you can change to that by just writing it to the end of the NODEJS_VERSION file and committing that change.

echo 4.2.42 >> .openshift/markers/NODEJS_VERSION
#
# Or alternatively, edit the .openshift/markers/NODEJS_VERSION file
# in your favorite editor aka vi ;^)
#
# Note: 4.2.42 doesn't exist (as yet) and is a fictitious version
#       mentioned here solely for demonstrative purposes.
#
git commit . -m 'use Node version 4.2.42'

Install the custom MongoDB cartridge. Remember, what comes after -a is what you named your application.

rhc cartridge-add http://cartreflect-claytondev.rhcloud.com/github/icflorescu/openshift-cartridge-mongodb -a parseserver

Add your custom environment variables

rhc env-set PARSE_APP_ID=whatever PARSE_MASTER_KEY=whatever -a parseserver

Then push to the OpenShift repo

git push

Visit your app to make sure it's running

http://parseserver-YOURNAMESPACE.rhcloud.com/

Test pushing data into your Parse database

curl -X POST -H "X-Parse-Application-Id: YOUR_APP_ID" -H "Content-Type: application/json" -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' http://parseserver-YOURNAMESPACE.rhcloud.com/parse/classes/GameScore

Test getting your data back

curl -X GET -H "X-Parse-Application-Id: YOUR_APP_ID" -H "X-Parse-Master-Key: YOUR_APP_MASTER_KEY" http://parseserver-YOURNAMESPACE.rhcloud.com/parse/classes/GameScore

openshift-parse-server's People

Contributors

kanakiyajay avatar kylebuch8 avatar ramr avatar

Watchers

 avatar  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.