Giter Site home page Giter Site logo

task_manager's Introduction

Task manager app

  • In order to run the project, setup .env and set MONGO_URI variable equal to DB connection string.
  • In order to avoid port collisions, default port value is 4000

CRUD APIs

  • GET /api/v1/tasks : get all tasks
λ curl -X GET http://localhost:4000/api/v1/tasks
[{"_id":"61c613db8ea7ff56f5b69c92","name":"here is my power","completed":true},{"_id":"61c6257f4a0218993173464e","name":"test","completed":false,"__v":0}]
  • POST /api/v1/tasks : create a new task
λ curl -H "Content-Type: application/json" -d "{\"name\":\"my new task\"}" http://localhost:4000/api/v1/tasks
{"name":"my new task","completed":false,"_id":"61c670e2d66d99f2b285a870","__v":0}
  • GET /api/v1/tasks/:id : get a single task
λ curl -X GET http://localhost:4000/api/v1/tasks/61c670e2d66d99f2b285a870
{"_id":"61c670e2d66d99f2b285a870","name":"my new task","completed":false,"__v":0}
  • PATCH /api/v1/tasks/:id : update a task
λ curl --request PATCH http://localhost:4000/api/v1/tasks/61c670e2d66d99f2b285a870 -H "Content-Type: application/json" -d "{\"name\":\"testing\"}"
{"_id":"61c670e2d66d99f2b285a870","name":"testing","completed":false,"__v":0}
  • DELETE /api/v1/tasks/:id : delete a task
λ curl --request DELETE http://localhost:4000/api/v1/tasks/61c670e2d66d99f2b285a870
{"_id":"61c670e2d66d99f2b285a870","name":"testing","completed":false,"__v":0}

Run local server

> MONGO_URI=<mongo server URL> node app.js

task_manager's People

Watchers

 avatar  avatar

task_manager's Issues

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.