Skip to content

To-Do RESTful API built with Node/Express with TypeScript and PostgreSQL, using the TypeORM library

License

Notifications You must be signed in to change notification settings

aaabdyrahmanov/todo-api

Repository files navigation

To-Do RESTful API

Run in Postman

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.

Getting Started

Following instructions will help you to get a copy of the project and run on your local machine for the development and testing purposes.

Prerequisites

  • Install local Node.js environment
  • Install Package manager to manage packages yarn
  • Install local db PosgreSQL

Setting up environment variables

.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

Running the project

# 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

Running the tests

To run the tests dependencies should be installed

yarn install

yarn test

API endpoints

  • ✅ 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

Built With

License

Distributed under the MIT License. See LICENSE for more information.

About

To-Do RESTful API built with Node/Express with TypeScript and PostgreSQL, using the TypeORM library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published