npm install dev
src
|-- components
|-- jwt
|-- config.js
.env
- Install mogodb
- Update .env file
- Run:
npm start
Content-Type application/json
X-Requested-With XMLHttpRequest
- Client connect to server:
var connection = new WebSocket('ws://domain.com/notification'); - Message response:
{
"status":200,
"lottery":true,
"winning_number":{
"type":"JackPot",
"white_ball_1":4,
"white_ball_2":12,
"white_ball_3":24,
"white_ball_4":35,
"white_ball_5":53,
"red_ball":16,
"date_created":"Sat, 16 Feb 2019 17:25:05 GMT"
}
}
- Endpoint testing:
GET: http://localhost:3000/api/v1/lottery/testing
API endpoint: http://domain.com/api/v1/lottery_times
- GET: get countdown time
Response:
{ "lottery_time": "16:00:00" } - POST: create countdown time
@Params{ "time": "16:00:00" //Format HH:mm:ss } - PUT: update countdown time
@Params
{ "time": "16:00:00" //Format HH:mm:ss }
In comming...