A robust RESTful API service for managing digital bookshelf collections. Built using Node.js and the @hapi/hapi framework, strictly conforming to the Airbnb JavaScript Style Guide.
The API conforms to standard HTTP verbs and status codes:
| Method | Endpoint | Description |
|---|---|---|
POST |
/books |
Store a new book |
GET |
/books |
Retrieve all books (supports name, reading, finished query filters) |
GET |
/books/{bookId} |
Retrieve detail of a specific book |
PUT |
/books/{bookId} |
Update an existing book's metadata |
DELETE |
/books/{bookId} |
Remove a book from the collection |
- Name Validation: Rejects requests if
nameproperty is missing with400 Bad Request. - Page Logic: Rejects creation/update if
readPage > pageCountwith400 Bad Request. - Automatic Status: Automatically computes
finished: truewhenpageCount === readPage.
git clone https://github.com/Akarptra/Bookshelf-api.git
cd Bookshelf-api
npm installnpm run lintnpm start
# Server will run on http://localhost:9000- Raka Putra Pratidina — GitHub (@Akarptra)