-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Harry Turnbull edited this page May 30, 2020
·
1 revision
This is a backend API for the Mission Ctrl game.
- Express
- Mongoose
- MongoDB
- Node
POST to /scores
route, json body:
{
"name": "Dave",
"score": 100,
}
Expected response status 200, response body:
{
"_id": "5ed22c319a146a4ad81453d6",
"name": "Dave",
"score": 100,
"date": "2020-05-30T09:49:37.375Z",
"__v": 0
}
GET to /scores
route, expected response status 200, response body:
[
{
"_id": "5ed22c319a146a4ad81453d6",
"name": "Dave",
"score": 100,
"date": "2020-05-30T09:49:37.375Z",
"__v": 0
},
{
"_id": "5ed139a7e7936a50fa921e20",
"name": "Jim",
"score": 100,
"date": "2020-05-29T16:34:47.085Z",
"__v": 0
}
]