This repository contains the code for the BackEnd Beginner course submission on Dicoding. The project is named "Submission Bookshelf API," which is a simple RESTful API developed using the Hapi framework in Node.js. The API allows basic CRUD (Create, Read, Update, Delete) operations related to bookshelf data.
- Node.js installed on your machine
- npm (Node Package Manager) installed
- Any code editor of your choice (e.g., Visual Studio Code)
-
Clone this repository to your local machine:
git clone https://github.com/mueiya/Dicoding-BackEnd-Beginner.git
-
Navigate to the project directory:
cd Dicoding-BackEnd-Beginner -
Install dependencies:
npm install
-
Run the application:
npm start
The API will be accessible at http://localhost:9000.
If you want to run the application in development mode with auto-restart using nodemon:
npm run start-devGET /books: Get all books.GET /books/{bookId}: Get a specific book by ID.POST /books: Add a new book.PUT /books/{bookId}: Update a book by ID.DELETE /books/{bookId}: Delete a book by ID.
You can use tools like Postman to test the API endpoints. And here's the link to the test collection and environment provided by Dicoding.