$ git clone git@github.com:caioagiani/biblioteca-nodejs-api.git
$ cd biblioteca-nodejs-api
$ yarn install
Configurar variáveis ambiente:
$ cp .env.example .env
Iniciar padrão:
$ yarn dev
# Ou iniciar com docker 🐳
$ docker-compose up
Testes
$ docker-compose run --rm api npm test
Starting db ... done> nodejs@1.0.0 test /usr/src/app
> NODE_ENV=test jest --setupFiles dotenv/config --detectOpenHandles --forceExit
PASS __tests__/booking.test.js
PASS __tests__/book.test.js
PASS __tests__/user.test.js
Test Suites: 3 passed, 3 total
Tests: 15 passed, 15 total
Snapshots: 0 total
Time: 8.558 s
Ran all test suites.