Data Neuron is an API for managing products with functionalities like adding, updating, deleting, and retrieving products. It also provides endpoint to track API call counts.
- Getting Started
- Prerequisites
- Installation
- Usage
- Endpoints
- Contributing
- License
- Getting Star
Before running the application, make sure you have the following installed:
- Node.js
- MongoDB
Clone the repository:
git clone <repository-url>
cd data-neuron-api
npm install
Create a .env file in the root directory and add the following:
PORT=8080
MONGODB_URI=<your-mongodb-uri>
npm start
- Endpoints
URL: /add
Method: POST
Request Body:
{
"name": "Product Name",
"description": "Product Description",
"price": 10,
"quantity": 100
}
URL: /dataneuron/update/:id
Method: PATCH
Request Body:
{
"name": "Updated Product Name",
"description": "Updated Product Description",
"price": 15,
"quantity": 50
}
URL: /dataneuron/all
Method: GET
URL: /dataneuron/count
Method: GET
URL: /dataneuron/delete/:id
Method: DELETE
URL: /dataneuron/deleteall
Method: DELETE