A Simple CRUD Web API with JWT authentication, creation of users with differents roles to add and fetch books
$ git clone https://github.com/v-cardona/bookstore_api.git
- cd into
bookstore_api
- run
npm install
- create a docker container with postgres image
docker run -d -p DOCKER_PORT:5432 --name bookstore_container -e POSTGRES_PASSWORD=password postgres
- set up your postgres database
- create a firebase project and a storage bucket
- rename
.env.sample
to.env
and populate the parameters - rename
.orm.config.json.sample
to.orm.config.json
and populate the parameters - run databse migration
npm run migration:run
- run
npm run start:dev
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
- Open a web browser and acces to http://localhost:5000/docs/
- generate migration
npm run migration:generate --name
- run migration
npm run migration:run
- revert migration
npm run migration:revert