This is a simple Inventory Management System implemented using Node.js, Express, and MongoDB.
To get started with the project, follow these instructions:
- Node.js installed on your machine
- MongoDB installed and running locally or accessible via connection string
- Clone this repository to your local machine:
git clone
- Navigate to the project directory:
cd inventory-management-system
- Install dependencies using npm:
npm install
- Create a
.env
file in the root directory of the project. - Add the following environment variables to the
.env
file:
PORT=3000 MONGO_URI=
To start the server, run the following command:
npm run dev
This will start the server on the specified port (default is 3000) and connect to the MongoDB database using the provided connection string.
- GET
/api/products
: Get all products - GET
/api/product/:id
: Get a product by ID - POST
/api/product
: Add a new product - PATCH
/api/product/:id
: Update a product by ID - DELETE
/api/product/:id
: Delete a product by ID
Replace :id
with the actual ID of the product.
Contributions are welcome! Please feel free to open an issue or submit a pull request for any improvements or additional features.
This project is licensed under the MIT License.