Giter Site home page Giter Site logo

muslimshah / taskmanagerapi Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 48 KB

TaskManagerAPI simplifies task management with essential features: listing tasks, creating new ones, accessing specific tasks by ID, updating details, and deleting tasks.

JavaScript 53.56% HTML 13.19% CSS 33.25%
api express nodejs rest-api

taskmanagerapi's Introduction

Task Manager API

This is a task manager API created using Node.js, Express.js, and MongoDB.

Getting started

To get started with the application, you will need to have Node.js and MongoDB installed on your system.

  1. First, clone the repository and navigate to the project directory.
  2. git clone https://github.com/MuslimShah/taskManagerAPI.git 
    cd taskManagerAPI
  3. Then, install the necessary dependencies using npm:
  4. npm install
  5. You will also need to create a .env file in the project root directory and set the following environment variables:
  6.     PORT=3000
    MONGODB_URL=mongodb://localhost:27017/task-manager-api
    JWT_SECRET=your_jwt_secret_key
    

    Make sure to replace your_jwt_secret_key with your own secret key.

  7. Start the server by running:
  8. npm start

API routes

The following API routes are available:

  • GET /api/v1/tasks - Returns a list of all tasks.
  • POST /api/v1/tasks - Creates a new task.
  • GET /api/v1/tasks/:id - Returns a single task with the specified ID.
  • PATCH /api/v1/tasks/:id - Updates a task with the specified ID.
  • DELETE /api/v1/tasks/:id - Deletes a task with the specified ID.

Example requests

Here are some example requests:

Creating a new task

  POST /api/v1/tasks
Request body:
{
"title": "Task title",
"description": "Task description"
}

Updating a task

  PATCH /api/v1/tasks/:id
Request body:
{
"title": "New task title"
}

Conclusion

That's it! You now have a fully-functional task manager API built with Express.js. If you have any questions or issues, feel free to open an issue or pull request in the repository.

taskmanagerapi's People

Contributors

muslimshah 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.