Assignment 9 — Express + MongoDB REST API

Books REST API

Full CRUD API built with Express 5 and MongoDB via Mongoose. Try every endpoint live — no Postman needed.

5 Endpoints
MongoDB Database
Books

🟢 Server Health

Checking…
GET /api/health

📚 All Books

Loading…
ID Title Author Genre Year Price Stock Actions
Loading books…

🚀 API Explorer

GET /api/books Get all books (supports ?genre= and ?inStock= filters)
Response
GET /api/books/:id Get a single book by MongoDB ID
Response
POST /api/books Create a new book
Response
PUT /api/books/:id Update an existing book (any fields)
Response
DELETE /api/books/:id Delete a book by MongoDB ID
Response