Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Bookshelf RESTful API

Node.js Hapi ESLint

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.


⚡ API Specification

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

Validation Rules

  • Name Validation: Rejects requests if name property is missing with 400 Bad Request.
  • Page Logic: Rejects creation/update if readPage > pageCount with 400 Bad Request.
  • Automatic Status: Automatically computes finished: true when pageCount === readPage.

🚀 Getting Started

1. Installation

git clone https://github.com/Akarptra/Bookshelf-api.git
cd Bookshelf-api
npm install

2. Linting & Validation

npm run lint

3. Run Server

npm start
# Server will run on http://localhost:9000

👤 Author

About

RESTful API service for Bookshelf application built with Node.js and Hapi framework.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages