- NodeJS
- Express Framework
- Jest test
- Docker
- Babel
- Eslint
- Prettier
GET /api/person
POST /api/person
- Payload example
{
"name": "Luiz Filipe",
"contacts": [
{
"service": "facebook",
"contact": "luizfilipemoresco"
}
]
}
PUT /api/person([0-9]+)
- Payload example
{
"name": "Luiz Filipe",
"contacts": [
{
"service": "facebook",
"contact": "luizfilipemoresco"
},
{
"service": "phone",
"contact": "48 9 96**-5****"
}
]
}
DELETE /api/person/([0-9]+)
- Run the following command
make
and it will use docker-compose to start PostegreSQL and the application in development mode
- Run the following command
make prod
and it will run the docker with PostgreSQL and the application
- Run
yarn
to install the dependecies - Run
yarn test
to execute all the unit tests - Run
yarn dev:coverage
to help you while you're writing tests - Run
yarn coverage
it will generate a directory called bycoverage
when you can see via browser the code coverage test. Examplefirefox coverage/lcov-report/index.html