The task is to create backend for a Masai Library is a comprehensive collection of resources designed to support your learning journey in the field of computer science and software engineering.
deployed backend : Live Link
- JavaScript
- Node.js
- Express
- MongoDB
POST /api/register This endpoint is used to register a new user.
POST /api/login This endpoint is used to log in users.
GET /api/books This endpoint should return a list of all available books.
GET /api/books/:id This endpoint should return the details of a specific book identified by its ID.
GET /api/books?category=fiction
This endpoint should give only those books whose category is fiction. (Should work with all the categories, not just fiction)
**GET /api/books?author=corey&category=fiction
This endpoint should give only those books whose author is corey and the category is fiction. (Should work for all combinations)
- id:
books_id
- id:
orders_id
POST /api/books This endpoint should allow admin to add new books to the system. (Protected Route)
PATCH /api/books/:id This endpoint should allow admin to update the details of a specific book identified by its ID. (Protected Route)
DELETE /api/books/:id This endpoint should allow admin to delete a specific book identified by its ID. (Protected Route)
- id:
books_id
- itemId:
orders_id
POST /api/orders This endpoint should allow the customer to place an order for a list of books. (Protected Route)
GET /api/orders This endpoint should allow admin to view all the orders placed so far with the user and book details. Populate both user and book data, and not just id’s. (Protected Route)