To better understand about the ports that the services are running, check in: docker-compose.yml
npm run config:env
docker-compose up -d --build
docker-compose exec api npm run typeorm:migration:run
API: http://localhost:3000/api/v1/healthcheck
Swagger: http://localhost:3000/api/v1/docs
Report Coverage: http://localhost:3000/report-coverage
To access db-admin, enter in browser: http://localhost:8080
user: root
password: root
database: address-book
First thing if you are running the API container on docker, use:
docker-compose stop api
because will conflict the ports.
Run only if you do not have .env file yet, otherwise will overwrite the current.
npm run config:env
Change TYPEORM_HOST="db" to TYPEORM_HOST="localhost" in .env
npm run typeorm:migration:run
npm run dev
npm run test <---- Only run the test
npm run test:coverage <----- Run test generating coverage text and html
npm run test:coverage:text <---- Run test generating only coverage text