Giter VIP home page Giter VIP logo

task-management-api's Introduction

Task Management API

Description

  • This API can be used for managing tasks. It is a REST API built with Node.js, Express.js and PostgreSQL.
  • To manage migrations we have used sequelize-cli and sequelize-orm.
  • This API supports JWT authentication and authorization.
  • This API follows robus error-handeling, Object Oriented Programming and MVC architecture.

Local Setup

    git clone https://github.com/alpha951/Task-management-API.git
    cd Task-management-API
    npm install
  • Create a .env file similar to .example.env file and add your environment variables.
  • Run npx sequelize init to setup sequelize.
  • Configure your ./config/config.json file to connect to your database.
  • Run npx sequelize db:migrate to run migrations.
  • Run npx sequelize db:seed 20230921112358-demo-users.js to seed the database with users.
  • Run npx sequelize db:seed 20230921081302-demo-tasks.js to seed the database with tasks.

PASSOWRD for all the users is 1234 in Seeders

Database Sample

Database Sample

API Documentation

Following are the API endpoints and their usage.

Authentication

Signup

    - POST
    - http://localhost:3000/api/v1/user/signup
    - BODY : name, email, password

Signin

    - POST
    - http://localhost:3000/api/v1/user/signin
    - BODY : name, email, password

Tasks

- http://localhost:3000/api/v1/task

Create Task

    - POST
    - http://localhost:3000/api/v1/task
    - BODY : description, status
    - HEADER : x-access-token : JWT-TOKEN

Get All Tasks

    - GET
    - http://localhost:3000/api/v1/task
    - HEADER : x-access-token : JWT-TOKEN

Get Task by id

    - GET
    - http://localhost:3000/api/v1/task/:id
    - HEADER : x-access-token : JWT-TOKEN

Update Task

    - PATCH
    - http://localhost:3000/api/v1/task/:id
    - HEADER : x-access-token : JWT-TOKEN

Delete Task

    - DELETE
    - http://localhost:3000/api/v1/task/:id
    - HEADER : x-access-token : JWT-TOKEN

task-management-api's People

Contributors

alpha951 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.