Project developed to represent a task API designed in Node. A challenge in the Ignite Rocketseat course to practice and go further in terms of Node's abilities.
- Node's HTTP, Crypto and FS modules;
- CSV lib;
- Make sure ID exists in database before any update\complete\delete operation;
- Validate if update\post routes don't have an empty body.
- Handled Node's native modules;
- Amped up the API's building skills;
- Learned how to retrieve CSV data.
Install the project with the following commands:
npm install
cd PROJECTS_NAME
GET /tasks
GET /tasks?=search=PARAM
POST /tasks
Data | Type | Description |
---|---|---|
title |
string |
Mandatory. Tasks title |
description |
string |
Mandatory. Tasks description |
PUT /tasks/:id
Data | Type | Description |
---|---|---|
id |
string |
Mandatory. Tasks ID goes in the URL |
title |
string |
Optional. Tasks title |
description |
string |
Optional. Tasks description |
updated_at |
date |
Date is automatically filled. |
DELETE /tasks/:id
Data | Type | Description |
---|---|---|
id |
string |
Mandatory. Tasks ID goes in the URL |
PATCH /tasks/:id/complete
Data | Type | Description |
---|---|---|
id |
string |
Mandatory. Tasks ID goes in the URL |
updated_at |
date |
Date is automatically filled. |
completed_at |
date |
Date is automatically filled. |