KhanShaheb34 / ToDoApp-REST

Just learning REST with Node and MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ToDoApp-REST

Just learning REST with Node and MongoDB

To run the server:

  • Clone/Download the repository

  • Open terminal inside the downloaded repository folder

  • Run

    npm i && npm i --dev

  • Install and run mongod and mongo

  • Run

    yarn start

Then the api server will be started on localhost:3000

API Documentation

  • /tasks
    • get -> Show all of the tasks
    • post -> Create a task
  • /task/:taskId
    • get -> Show the task with id of the taskId
    • put -> Update the task
    • delete -> Delete the task

Data Model

  • Single task
    {
      _id: "_id, auto generated",
      name: "String, required",
      status: "String",
      createdOn: "Date"
    }
  • All task
    [
      {"Single Task"},
      {"Single Task"},
      {"Single Task"}
    ]

About

Just learning REST with Node and MongoDB


Languages

Language:JavaScript 100.0%