Skip to content

Huseinaby/Bookshelf-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bookshelf API

Node.js Hapi.js ESLint

A simple RESTful API for managing a collection of books, allowing users to perform basic CRUD (Create, Read, Update, Delete) operations. This project was developed as a final submission for the "Belajar Membuat Aplikasi Back-End untuk Pemula" (Learning to Build a Back-End Application for Beginners) course on the Dicoding platform.

The application is built with vanilla Node.js and the Hapi.js framework, with data being stored in-memory in a local array (no database).

Key Features

  • Add a New Book: Save a new book with details like title, author, and summary.
  • Get All Books: Retrieve a list of all saved books.
  • Get Book by ID: Fetch the details of a specific book using its unique ID.
  • Update Book Data: Modify the information of an existing book.
  • Delete a Book: Remove a book from the collection.
  • Query Parameters: Filter the book list based on name, reading status, or finished status.

Teck Stack

  • Runetime Environtment: Node.js
  • Web Framework: Hapi.js
  • Unique ID Generation: nanoid
  • Code Linter: ESLint
  • Development Tools: Nodemon

Installation & Setup

Follow these steps to get the project running on your local machine.

  1. Clone the repository:
    git clone https://github.com/Huseinaby/Bookshelf-API.git
    cd Bookshelf-API
  2. Install dependencies:
    npm install
  3. Run server:
    npm run start
    The API will be available at http://localhost:5000.

API Endpoints

Method Endpoint Description
POST /books Add New Book
GET /books Get All Books
GET /books/{id} Get Book by ID
PUT /books/{id} Update Book by ID
DELETE /books/{id} Delete Book by ID

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published