This template gets you started with Node.js TypeORM Postgres faster.
set up the development environment with the following steps
- clone the repository
- Run
npm icommand - create a
.envfile in the root directory and copy the contents of.env.exampleinto it - Run
npm run docker:buildcommand, to build the docker container - Run
npm run docker:runcommand, to run the docker container
Commit messages must meet conventional commits format.
Run npm run prepare to install husky hooks.
Set syncDatabase to false in data-source.ts to enable migrations. Then run the following commands
- Run
npm run migration:generate -- ./src/migrations/<migration-name>to generate a migration file. For examplenpm run migration:generate -- ./src/migrations/create-users-table - Run
npm run migration:runto run migrations - Run
npm run migration:revertto revert migrations