An API library where users can store, read and receive books
- Clone the project locally
- cd into the project folder
- run
npm installto install dependencies - run
npm run dev:startto start local instance using nodemon - open
http://localhost:3000in your browser
- GET /:id - Display user details
- POST /register => Registers a new user
- POST /login => Login a user into the application
- POST /logout => Logout a user from the application
- GET / Returns all available books in the library
- GET /:id Returns a particular book by its ID
- POST / Adds a new book to the library
- DELETE /:id Removes a book from the library
- PATCH /:id Updates a book in the Library
| field | data_type | constraints |
|---|---|---|
| userName | string | required |
| string | required, unique | |
| password | string | required |
| subscribedBooks | objectId | ref: "books" |
| useRole | enum | [ user, admin ] |
| timestamps | date | auto-generated |
| id | string | auto-generated |
| field | data_type | constraints |
|---|---|---|
| name | string | required |
| id | string | auto-generated |
| field | data_type | constraints |
|---|---|---|
| title | string | required, unique |
| author | objectId | ref: "authors |
| description | string | required |
| body | string | required |
| isbn | string | auto-generated |
| category | enum | (tags, genre)? |
| timestamps | Date | auto-generated |
| id | string | auto-generated |
- Home/landing page
- Register/Login page
- Form page
- Book page