My TypeScript proof of concept.
A simple API wich manage a "todo" task list
The API consists in a complete "CRUD" to handle tasks lists.
The user can:
- Create a new task;
- List all tasks or filter specific tasks;
- Edit tasks;
- Delete tasks;
To create the API, the following tools were used:
- TypeScript
- Postgres
- Express
- JOI
Use the following routes to use the API:
GET /tasks
List all tasks, ordered by created time.
User can filter for specific member tasks by add a query "name" (/tasks/?name=)
Returns:
{
"id": number
"name": string
"description": string
"member": string
"created": date
"deadline": date
}
POST /tasks
Add a new task.
Body format (validated by JOI):
{
"name": string
"description": string
"member": string
"deadline": date (optional)
}
PUT /task/:id
Edit the selected task
DELETE /task/:id
Delete the selected task
GET /task/:id
Get the selected tasks by id