Giter Club home page Giter Club logo

todo-api's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.