by: G.A.JAGUAR
A bookstore inventory management api.
# build docker container and install dependencies.
sh install.sh# create a docker image
docker-compose build# install dependencies
docker-compose run --rm server yarn# serve with hot reload, by default at 127.0.0.1:3000
docker-compose up# build for production and launch server
docker-compose run --rm server yarn build
docker-compose run --rm server yarn start# install dependencies
# pnpm (recommended to save disk space)
pnpm i
# or with yarn
yarn
# or native
npm install# serve with hot reload, by default at 127.0.0.1:3000
pnpm dev# build for production and launch server
pnpm build
pnpm startuseridnameemailpassword
authoridname
publisheridname
genreidname
bookidnameauthorIdpublisherIdgenreIdyearisbnquantity
-
/api/users- POST
/: create a new user.
- GET
/: read all users./:id: read specific user.
- PATCH
/:id: update specific user.
- DELETE
/:id: delete specific user.
- POST
-
/api/authors- POST
/: create a new author.
- GET
/: read all authors./:id: read specific author.
- PATCH
/:id: update specific author.
- DELETE
/:id: delete specific author.
- POST
-
/api/publishers- POST
/: create a new publisher.
- GET
/: read all publishers./:id: read specific publisher.
- PATCH
/:id: update specific publisher.
- DELETE
/:id: delete specific publisher.
- POST
-
/api/genres- POST
/: create a new genre.
- GET
/: read all genres./:id: read specific genre.
- PATCH
/:id: update specific genre.
- DELETE
/:id: delete specific genre.
- POST
-
/api/books- POST
/: create a new book.
- GET
/: read all books./:id: read specific book.
- PATCH
/:id: update specific book.
- DELETE
/:id: delete specific book.
- POST
-
/api/populate- GET
/: inter mocked data into the database.
- GET