Current repository is an empty Node Express app built with Typescript.
- Git
- Docker Desktop
- Node 18.13.0 from any of the following:
- Node official website
- NVM (if you know what you are doing)
- VSCode and extensions:
- ESLint
- Prettier
- Git history / Git Lens
- Todo Tree
- Install yarn via
npm install -g yarn
- Install packages using package's manager command
yarn install
or simplyyarn
- Create a new
.env
file using.env.example
as a template. You might want to use the following commandcp .env.example .env
for local development 3.1. Fill the empty values in the newly created.env
file. By default the valuesNODE_ENV
will be empty, andNODE_PORT
will be3000
, also you'll find the environment variables necessary for starting connecting to other services like the database. Any one of those starting withCOUCHDB_*
are related to the database setup.
- Start the docker-compose configuration running
docker-compose up
, when you are done working you can shut it down usingdocker-compose down
. - Execute
yarn start:dev
.
Execute yarn test
to check that all tests passes, if you want to check how compliant your code is with the coverage rules, run yarn coverage
.
- The project locally runs with
nodemon
, a deamon that is watching for file changes to rerun the service from start. - In order to keep the code tidy, project counts with some validations before adding new code to the repository, to achieve this we count with husky hooks, currently the application have two hooks
- Pre-commit: Occurs before commiting a change, currently checks for:
- Linting
- Commit messages to be written in the form of a conventional commit.
- Pre-push: Occurs before pushing changes to remote, currently check for the unit test coverage to be in order. The unit testing framework currently used is Jest
- Pre-commit: Occurs before commiting a change, currently checks for:
- To make a change, change should be described in the Github Issues page
- The change to make should be worked on a new branch locally with the name of
${feature|hotfix|fix|chore|docs|ci|refactor}/${issue-number}
and then pushed to it's remote branch - A pull request should be created for that branch, description's template compliant, linked manually to the issue, and have at least one reviewer.
- No change should be merged without approval.