sarthaksarthak9 / crud-API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CRUD API

This is a simple RESTful API for managing products. It provides endpoints for basic CRUD (Create, Read, Update, Delete) operations on products.

Features

  • Create Product: Add a new product to the database.
  • Read Product: Retrieve information about a specific product or get a list of all products.
  • Update Product: Modify the details of an existing product.
  • Delete Product: Remove a product from the database.

Technologies Used

  • Node.js: JavaScript runtime environment.
  • Express.js: Web application framework for Node.js.
  • MongoDB: NoSQL database for storing product data.
  • Mongoose: MongoDB object modeling for Node.js.

Getting Started

Prerequisites

  • Node.js installed on your machine
  • MongoDB installed and running locally or on a remote server

Installation

  1. Clone the repository
git clone https://github.com/<username>/crud-API.git
  1. Install dependencies
cd crud-API
npm install
  1. Start the server
npm run dev

Endpoints

  • GET /products: Fetch all products.
  • GET /products/:id: Fetch a product by ID.
  • POST /products: Create a new product.
  • PUT /products/:id: Update a product by ID.
  • DELETE /products/:id: Delete a product by ID.

About


Languages

Language:HTML 79.9%Language:JavaScript 11.5%Language:Shell 5.0%Language:CSS 3.6%