This is a ready-to-run project for a coursework assignment (in-memory data).
- General routes (no login): list books, search by ISBN, author, title, get reviews.
- User routes (requires username+password in request body for protected actions): add/update/delete reviews.
- Axios client with async/await and Promises for Tasks 10-13.
- Install dependencies:
npm install - Start the server:
npm start - Server runs on port
3000by default.
GET /general/books— Get all booksGET /general/isbn/:isbn— Get book by ISBNGET /general/author/:author— Get books by authorGET /general/title/:title— Get books by titleGET /general/review/:isbn— Get reviews for a bookPOST /general/register— Register (body: { username, password })POST /general/login— Login (body: { username, password })PUT /user/review/:isbn— Add/Modify review (body: { username, password, review })DELETE /user/review/:isbn— Delete review (body: { username, password })
client/node_client.jscontains functions using axios:getAllBooks()— async/awaitgetBookByISBN(isbn)— PromisesgetBooksByAuthor(author)— async/awaitgetBooksByTitle(title)— async/await
- Data is stored in-memory. Restarting the server will reset books/users/reviews.