To-Do RESTful API to manage daily tasks with their to-do
, in-progress
and completed
statuses. App built with Node/Express with TypeScript and PostgreSQL, using the TypeORM library. API gives an ability of performing a CRUD operations on tasks.
Following instructions will help you to get a copy of the project and run on your local machine for the development and testing purposes.
- Install local Node.js environment
- Install Package manager to manage packages yarn
- Install local db PosgreSQL
.env
file in the root of the project need to be created and variables should be inserted as a key/value pairs in the following format of KEY=VALUE
:
# move into the root folder
cd todo-api
# rename the .env.sample
mv .env.sample .env
# move into the root folder
cd todo-api
# run the project in dev mode
yarn run dev
# build the project for prod
yarn run build
# run the project in prod after build
yarn run start
To run the tests dependencies should be installed
yarn install
yarn test
- ✅ Health check
GET - /v1/health
- ✅ OpenAPI Specification
GET - /v1/docs
- ✅ Add a new task
POST - /v1/tasks
- ✅ Get tasks
GET - /v1/tasks
- ✅ Get tasks paginated
GET - /v1/tasks?limit=20&page=2
- ✅ Get paginated tasks filtered by their statuses
GET - /v1/tasks?limit=20&page=2&status=completed
- ✅ Get task by ID
GET - /v1/tasks/:id
- ✅ Update a task status or name
PUT - /v1/tasks/:id
- ✅ Delete a task
DELETE - /v1/tasks/:id
- Express.js - The web framework used
- TypeORM - ORM
- Class-validator - Performing the validation
- Tsoa - OpenAPI-compliant REST APIs using TypeScript and Node
- Winston - Logger
- Jest - Testing framework
- Supertest - HTTP assertions
Distributed under the MIT License. See LICENSE
for more information.