#Fanyau API server
- Server: Node.js using express
- Database: Firebase Database project: Firebase project here
- Hosting: OpenShift using their
nodejs
cartridge: OpenShift project here
Note: Log in to both Firebase and OpenShift's services are registered under findyoursapp@gmail.com, login credentials available in slack's #accounts channel.
- clone this git
- Go to root directory of the repo (where
package.json
exists) - Run
npm install
to install dependencies - Run
node server.js
to start the server at your localhost, default link: http://localhost:8080/
OpenShift use a git push hook as deployment method. They provide a git server to store the project source, and any push
to this git server will trigger a release of the project which is publicly available at http://server-fanyau.rhcloud.com/.
- Add your Public SSH key to this console page. (More instructions go here)
- Add an extra remote source to this git you cloned earlier: ssh://57cb4a102d5271ad6c0000a9@server-fanyau.rhcloud.com/~/git/server.git/
- Push any changes to the git master branch will trigger a release
#Demo
It is available at the OpenShift's free domain: http://server-fanyau.rhcloud.com/ (custom domain is configurable too).
e.g.
GET /
: http://server-fanyau.rhcloud.com/GET /user/:userid
: http://server-fanyau.rhcloud.com/user/gigiho- This retrieves user info of stored data on the Firebase database and retrun the info as JSON.