- Run the following command to install node_modules and required packages to run the server:
yarn
- Run the following command to start up the server:
node app.js
-
Server runs on
localhost:4000
-
Run the following command to run the unit tests
yarn test
-
GET localhost:4000/allList
Nothing sent to backend
{
"data": [
{
"id": "123",
"item": "Eggs",
"checked": false
}
],
"error": null
}
- POST localhost:4000/addList
{
"id": "1234",
"item": "Milk",
"checked": true
}
{
"data": [
{
"id": "1234",
"item": "Milk",
"checked": true
}
],
"error": null
}
- DELETE localhost:4000/list/:id
Nothing in request body
{
"data": [
{
"id": "123",
"item": "Eggs",
"checked": false
}
],
"error": null
}