/bookshelf-api

Simple RESTful API Bookshelf For learn CRUD

Primary LanguageJavaScript

Bookshelf API

Bookshelf API is a simple RESTful API developed using the hapi framework on node.js. This API allows CRUD (Create, Read, Update, Delete) operations which are basic related to bookshelf data.

Prerequisites

  • node.js installed on your machine download
  • npm (Node Package Manager) installed see
  • Any code editor of your choice (e.g., Visual Studio Code)

Getting Started

  1. Clone this repository to your local machine:

    git clone https://github.com/leuthra/bookshelf.git
  2. Navigate to the project directory:

    cd bookshelf
  3. Install dependencies:

    npm install
  4. Run the application:

    npm start

    The API will be accessible at http://localhost:3000.

Endpoints

  • GET /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.

Usage

  • You can use tools like postman to test the API endpoints.

  • and you can check the docs bookshelf api test on docs