A bookshop API that allows users to create, read, update and delete books, and to create, read, update and delete stores and manage them.
- Node.js
- Express
- Postgresql as database
-
git clone https://github.com/esla-ahme/node-express-postgresql-bookAPI
cd node-express-postgresql-bookAPI
-
some dependencies are required for running the app
-
Nodemon is required for running the app.
-
Postgresql is required for running the app, edit
DATABASE_URL
in.env
file to match your database. Table creation screpts are in Scripts file.
-
-
To run the app
npm install npm start
the app must start serving on http://localhost:5000
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
- Logger
- AuditService
- Swagger Documentation
- Authentication
- Testing