This is a project submission for the "Belajar Membuat Aplikasi Back-End untuk Pemula" course on Dicoding which consists of building a RESTful API namely bookshelf API using the Hapi framework, Nodemon for automatic server restarting, and Postman for testing and also eslint.
🏠 Homepage
✨ Demo
- Displays a list of books
- View book details
- Add a new book
- Change book data
- Delete books
Clone this repo and install npm :
npm install
If you dont have or wanna change the "node_modules" use :
npm init --y
npm install @Hapi/hapi
npm install nodemon
if you haven't installed eslint, then you have to install it :
npm install --save-dev eslint
All manual install instruction is in here
npm run start
Access in Bookshelf API Test Collection & Environment using Postman or any other REST client at http://localhost:9000
GET /books
= Get all books in the bookshelfGET /books/{bookId}
= Get a book by its bookIdPOST /books
= Add a new book to the bookshelfPUT /books/{bookId}
= Update a book by its bookIdDELETE /books/{bookId}
= Delete a book by its bookId
All API endpoints will respond with JSON data in the following format:
"status": "success",
"message": "Success message",
"data": {
// Response data
}
}
If an error occurs, the response format will be:
"status": "fail",
"message": "Error message"
}
👤 Musketeer
- Website: MusketeerHD
- Instagram : azfa_dzulfaqar
- Twitter: @MusketeerHD
- Github: MusketeerHD
- LinkedIn: @Ahmad Azfa Dzulfaqar
Give a ⭐️ if this project helped you!
Copyright © 2023 Musketeer.
This project is MIT licensed.