Skip to content

pavan-kalyan0412/CRUD_TEST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRUD API

This is a simple CRUD (Create, Read, Update, Delete) API built with Node.js, Express, and MongoDB.

Getting Started

To get started with this project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/pavan-kalyan0412/CRUD_TEST.git
  2. Navigate to the project directory:

    cd CRUD-API
  3. Install dependencies:

    npm install
  4. Create a .env file in the root directory and add your MongoDB connection string. Example:

    mongo_url=mongodb://localhost:27017/your_database_name
    
  5. Start the server:

    npm start
  6. The server will start running on http://localhost:3000 by default.

API Endpoints

  • GET /api/products: Get all products.
  • GET /api/products/:id: Get a single product by ID.
  • POST /api/products: Create a new product.
  • PUT /api/products/:id: Update an existing product by ID.
  • DELETE /api/products/:id: Delete a product by ID.

About

A simple CRUD_API routes and testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published