Requires:
- Node Js v6+.
- Redis server up and running.
- MongoDb server Up and running.
check config.js
file to update redis and mongo URLs.
How to run:
- npm install
- npm start
Check package.json
file for more npm
commands.
Returns json data with a successful message. - not a efficient way, need to find a better way, a cron job or something.
-
URL
/room/start
-
Method:
GET
-
URL Params
None
-
Data Params
None
-
Success Response:
- Code: 200
Content:{ message: "RoomsQuickly auction's started." }
- Code: 200
-
Error Response:
- Code: 500 NOT FOUND
Content:{ error: "Internal server error" }
- Code: 500 NOT FOUND
Returns json list of active auction items ordered by time remaining for bidding.
-
URL
/room/rooms
-
Method:
GET
-
URL Params
None
-
Data Params
None
-
Success Response:
- Code: 200
Content:{ data: [...] }
- Code: 200
-
Error Response:
- Code: 500 NOT FOUND
Content:{ error: "Internal server error" }
- Code: 500 NOT FOUND
Returns json object either bid is a winner or not.
-
URL
/bid
-
Method:
POST
-
URL Params
None
-
Data Params
None
-
Success Response:
- Code: 200
Content:{ winner: true | false }
- Code: 200
-
Error Response:
- Code: 500 NOT FOUND
Content:{ error: "Internal server error" }
- Code: 500 NOT FOUND
Returns json object either bid is a winner or not.
-
URL
/bid/:id
-
Method:
GET
-
URL Params
Required:
id=[hex]
Bid ID -
Data Params
None
-
Success Response:
- Code: 200
Content:{ winner: true | false }
- Code: 200
-
Error Response:
- Code: 500 NOT FOUND
Content:{ error: "Internal server error" }
- Code: 500 NOT FOUND
Returns json object with a list of bidding on a room.
-
URL
/bid/room/:id
-
Method:
GET
-
URL Params
Required:
id=[hex]
Room ID -
Data Params
Required:
page=[integer]
-
Success Response:
- Code: 200
Content:{ data: [...] }
- Code: 200
-
Error Response:
- Code: 500 NOT FOUND
Content:{ error: "Internal server error" }
- Code: 500 NOT FOUND