This API implement the Rock, Paper, Scissors game.
-
Open the console and start the mongodb using the command './mongod'
-
Open
server.js
and start the app. -
Alternatively you can launch the app from the Terminal (mongod need to be running):
$ node server.js
Once the server is running, open the project in the shape of 'https://projectname-username.c9.io/'. and use the different methods available.
- POST -> api/championship/result".
- GET -> api/championship/top.
- POST api/championship/new.
In case of problems with mongodb follow this steps for run cloud9 First delete the data folder then run this commands...
- $ echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest "$@"' > mongod
- ./mongod https://community.c9.io/t/setting-up-mongodb/1717
I modified the database connection for avoid issues with the free service of cloud9...