Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abulfozoljumman/mongoose-express-crud-mastery
https://github.com/abulfozoljumman/mongoose-express-crud-mastery
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/abulfozoljumman/mongoose-express-crud-mastery
- Owner: AbulFozolJumman
- Created: 2023-11-24T01:10:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-30T16:20:32.000Z (6 months ago)
- Last Synced: 2024-11-08T22:23:12.998Z (2 months ago)
- Language: TypeScript
- Homepage: https://assignment-2-abulfozoljumman.vercel.app/
- Size: 328 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Server Vercel Link
- https://assignment-2-abulfozoljumman.vercel.app/
## Running the Program Locally
1. Clone the repository:
2. Install dependencies:
npm install -y
3. Start the server:
npm run start:dev
4. The server runs at [http://localhost:3000/](http://localhost:3000/)
5. Use a tool like Postman or a web browser to test the API endpoints.
## User Management Functions:
1. **Create a New User**
- API Endpoint: `POST /api/users`
2. **Retrieve a List of All Users**
- API Endpoint: `GET /api/users`
3. **Retrieve a Specific User by ID**
- API Endpoint: `GET /api/users/:userId`
4. **Update User Information**
- API Endpoint: `PUT /api/users/:userId`
5. **Delete a User**
- API Endpoint: `DELETE /api/users/:userId`## Order Management Functions:
1. **Add New Product in Order**
- API Endpoint: `PUT /api/users/:userId/orders`
2. **Retrieve all orders for a specific user**
- API Endpoint: `GET /api/users/:userId/orders`
3. **Calculate Total Price of Orders for a Specific User**
- API Endpoint: `GET /api/users/:userId/orders/total-price`