Giter Site home page Giter Site logo

avinashanand02 / pedalstart Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.98 MB

This project implements a RESTful API for managing tasks using Node.js, Express, and MongoDB with Mongoose.

License: MIT License

JavaScript 62.74% HTML 11.34% CSS 25.92%
assignment crud crud-application nodejs reactjs to-do-list pedalstart

pedalstart's Introduction

Task Management REST API

This project implements a RESTful API for managing tasks using Node.js, Express, and MongoDB with Mongoose.

Features

  • CRUD Operations: Allows creating, reading, updating, and deleting tasks.
  • MongoDB Integration: Uses Mongoose to interact with a MongoDB database.
  • Error Handling: Implements basic error handling for database operations.
  • Middleware: Includes body-parser for parsing JSON and cors for handling Cross-Origin Resource Sharing.
  • Routing: Defines routes for /api/tasks to manage tasks.

Prerequisites

Before running the application, make sure you have the following installed:

  • Node.js
  • MongoDB

Getting Started

  1. Clone the repository:

    git clone https://github.com/AvinashAnand02/PedalStart.git
    cd PedalStart
  2. Install dependencies:

    npm install
  3. Set up MongoDB:

  • Make sure MongoDB is running on localhost:27017 or update the connection string in app.js.
  1. Start the server:

    npm start
    

The server will start running on http://localhost:3001.

API Endpoints

Get all tasks

  • URL: /api/tasks
  • Method: GET
  • Response: Retrieves all tasks stored in the database.

Get a single task

  • URL: /api/tasks/:id
  • Method: GET
  • Response: Retrieves a single task by its ID.

Create a task

  • URL: /api/tasks
  • Method: POST
  • Request Body: JSON object with title, description, and dueDate fields.
  • Response: Creates a new task and returns the created task object.

Update a task

  • URL: /api/tasks/:id
  • Method: PUT
  • Request Body: JSON object with updated title, description, and dueDate fields.
  • Response: Updates an existing task and returns the updated task object.

Delete a task

  • URL: /api/tasks/:id
  • Method: DELETE
  • Response: Deletes a task by its ID and returns a success message.

Screenshots

Task List Screenshot Task Detail Screenshot Task Form Screenshot

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Design inspired by Avinash Anand.

This Task Management Application was developed solely by me for the first round of the full-stack developer job role at PedalStart. Special thanks to PedalStart for providing the opportunity to showcase skills and abilities in this assignment.

pedalstart's People

Contributors

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