savioferraz / poc-ts

My TS proof of concept

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POC_TS

My TypeScript proof of concept.
A simple API wich manage a "todo" task list

Description

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

Usage

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

About

My TS proof of concept


Languages

Language:TypeScript 100.0%