-
MongoDB: Database system for storing data.
-
Node.js: JavaScript runtime for executing server-side code.
-
Express: Web application framework for Node.js used to build APIs.
-
JWT: JSON Web Tokens for secure authentication between the client and the server.
- Development: Start the server in development mode with automatic js compilation:
npm run start
- Production: Build the TypeScript code and start the server:
NODE_ENV=production nodemon server.js
- Login:
POST api/auth/login
- SignUp:
POST api/auth/register
- Update Customer Password:
PATCH api/auth/updateMyPassword
- Delete Customer Account:
DELETE api/customers/deleteMyAccount
- Show All Customers:
GET api/customers/showCustomers
- Get Customer By Username:
GET api/customers/getCustomerByUsername/:username
- Add New Book:
POST api/books/addBook
- Show All Books:
GET api/books/showBooks
- Delete Book:
DELETE api/books/deleteBook/:ISBN
- Edit Book:
PATCH api/books/editBook/:ISBN
- Get Book:
GET api/books/getBookByISBN
- Make Order:
POST api/orders/makeOrder
- Show Orders:
GET api/orders/showOrders
- Cancel Order:
DELETE api/orders/cancelOrder/:orderId
- Retrieve all customer orders:
GET api/orders/getAllOrdersForMe
- Get Order By Id:
GET api/orders/getOrderById/:orderId