This is the backend of the Project Name. It is built using Node.js, Express.js, and MongoDB.
- Node.js (v14.x or later)
- MongoDB (v4.x or later)
- npm (v6.x or later)
- Clone the repository:
git clone https://github.com/your-username/your-backend-repository.git cd your-backend-repository
npm install
PORT=5000
MONGO_URI=your_mongodb_uri
npm run start:dev
The server will start on http://localhost:5000.
.GET /api/products - Get all products
.GET /api/products/ - Get a product by ID
POST /api/products - Create a new product
PUT /api/products/ Update a product by ID
DELETE /api/products/ Delete a product by ID
GET /api/orders - Get all orders
GET /api/orders/ Get an order by ID POST /api/orders - Create a new order
PUT /api/orders/ Update an order by ID
DELETE /api/orders/ Delete an order by ID (protected route)
Environment Variables
PORT - Port number for the server to run on (default: 5000)
MONGO_URI - MongoDB connection string
Fork the repository
Create your feature branch (git checkout -b feature/your-feature)
Commit your changes (git commit -m 'Add some feature')
Push to the branch (git push origin feature/your-feature)
Open a pull request