Skip to content

Repository files navigation

RESTful API with Node.js, Express, and MongoDB

Project Setup

Prerequisites

  • Node.js installed
  • MongoDB instance (local or MongoDB Atlas)

Installation

  1. Clone the repository:
    git clone https://github.com/YOUR_GITHUB_USERNAME/restful-api-node.git
    cd restful-api-node
  2. Install dependencies:
    npm install
  3. Create a .env file and add your MongoDB connection string:
    MONGO_URI=your_mongodb_connection_string
  4. Start the server:
    npm start

API Endpoints

Get all items

GET /items

Create a new item

POST /items

Request Body

{
  "name": "Item Name",
  "description": "Item Description"
}

Update an item

PATCH /items/:id

Delete an item

DELETE /items/:id

Documentation

The API documentation is available on Postman: https://documenter.getpostman.com/view/41795951/2sAYXECcy

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages