Use the following commands in your terminal (assuming that you already have node
and npm
installed) in order to test:
npm install
oryarn install
node index.js
The POST/PUT body structure is as follows:
Projects:
{
"id": (int),
"title": (string)
}
Tasks:
{
"title": (string)
}
Example of a project with values:
{
"id": 1,
"title": "Project A",
"tasks": [
"Task 1",
"Task 2"
]
}
Projects
-
List all projects:
GET: /projects
-
Create a project:
POST: /projects
-
Update a project:
PUT: /projects/:id
-
Delete a project:
DELETE: /projects/:id
Tasks:
- Add a task to a project:
POST: /projects/:id/tasks