This is a simple REST API for managing a collection of books, created as part of a web development internship at ELEVATE LABS. The API supports basic CRUD (Create, Read, Update, Delete) operations and stores data in memory.
- Node.js
- Express.js
- Postman (for testing)
- Clone the repository:
git clone <repository-url> - Navigate to the project directory:
cd nodejs-book-api - Install dependencies:
npm install - Start the server:
node index.js
The server will be running at http://localhost:3000.
| Method | Endpoint | Description |
|---|---|---|
GET |
/books |
Get a list of all books. |
POST |
/books |
Add a new book. |
PUT |
/books/:id |
Update an existing book by ID. |
DELETE |
/books/:id |
Delete a book by ID. |