esla-ahme / node-express-postgresql-bookAPI

BOOK API A Node.js API for managing books and stores. Built with Express and PostgreSQL. CRUD operations for books and stores.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BOOK API

A bookshop API that allows users to create, read, update and delete books, and to create, read, update and delete stores and manage them.

Technologies

  1. Node.js
  2. Express
  3. Postgresql as database

Installation

  1. Clone the repo

    git clone https://github.com/esla-ahme/node-express-postgresql-bookAPI

    cd node-express-postgresql-bookAPI

  2. Dependencies and Requirements

    some dependencies are required for running the app

    1. Nodemon is required for running the app.

    2. Postgresql is required for running the app, edit DATABASE_URL in .env file to match your database. Table creation screpts are in Scripts file.

    ER Diagram ERD

  3. Run the server

    To run the app

    npm install
    npm start 

    the app must start serving on http://localhost:5000

EndPoints

Swagger Documentation is available on http://localhost:5000/api-docs

Get all books | GET api/v1/books

Get book by id | GET api/v1/books/:id

Add book | POST api/v1/books/add Update book | PUT api/v1/books/update/:id

delete book | DELETE /books/delete/:id


Get all stores | GET api/v1/stores

Get store by id | GET api/v1/stores/:id

Add store | POST api/v1/stores/add

Services

  • Logger
  • AuditService
  • Swagger Documentation
  • Authentication
  • Testing

About

BOOK API A Node.js API for managing books and stores. Built with Express and PostgreSQL. CRUD operations for books and stores.


Languages

Language:JavaScript 100.0%