Coder Social home page Coder Social logo

bosses-todo's Introduction

bosses-todo

Keeps the todo list of pointy haired boss

Travis Build Summary

Major Dependencies

  • Typescript
  • Express
  • @Overnight/Core
  • @Overnight/Jwt
  • Passport
  • Mongoose
  • Inversify
  • Winston
  • Jsonwebtoken

Navigate to the root directory of the app and create following directories.

mkdir build
mkdir logs

Commands to run

  • Build Code: npm run build
  • Run Unit test cases: npm run test
  • Run app in development mode: npm run play
  • Run app in production mode: npm run prod

Service Details

In development mode, this app runs on 3001 port. Following REST APIs are exposed.

Add User

POST http://localhost:3001/user

Body

{
  "firstName": "John",
  "lastName": "Doe",
  "email": "[email protected]",
  "password": "SomePassword@123"
}

NOTE: This API is currently exposed without authentication to add a few users without login.

Login User

POST http://localhost:3001/security/login

Body

{
  "email": "[email protected]",
  "password": "yourPassword@123"
}

On successful authentication, you will recieve the following response header with the JWT token to access TODO APIs.

auth-token: <some-encrypted-jwt-token>

Todo APIs

To access Todo APIs, a requester must be authenticated and have the JWT access token.

Request Header

Authorization: Bearer <some-encrypted-jwt-token>

Add Todo

POST http://localhost:3001/secure/todo

Body

{
 "title": "Take interview",
 "description": "Node.js items are lined up!"
}

GET TODO

GET http://localhost:3001/secure/todo

UPDATE TODO

PUT http://localhost:3001/secure/todo

Body

{
 "title": "Take interview Today",
 "todoId": "7abeb4e4-b112-47b5-b2d7-3e8189fa026e"
}

DELETE TODO

DELETE http://localhost:3001/secure/todo/<todoId>

bosses-todo's People

Contributors

varshneyjayant avatar dependabot[bot] avatar

Watchers

James Cloos avatar  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.