This template includes
$ yarn install
- running docker container
$ docker-compose up -d
- running DB migration to check database is available
$ yarn typeorm migration:run #local
- running test to check everything is fine
$ yarn test
$ yarn start
Since scripts are written in TypeScript you need to use ts-node
:
$ yarn ts-node path/to/the/script
- create new migration
yarn typeorm migration:create -n YourMigrationName
or you can just modify entity and generate migration from the modification
yarn typeorm migration:generate -n YourMigrationName
- run migration
yarn typeorm migration:run
- rollback migration
yarn typeorm migration:revert
for more information on typeorm
cli command.
just run
yarn typeorm
dist/
: wepback bundle filedocker/
: docker related file. Currently, it has db init script.src/
: source codes__test__/
: test scriptsscripts/
: miscellaneous scriptsREAD.md
: this filedocker-compose.yml
: docker config for development and test databaseecosystem.config.js
: pm2 deployment configormconfig.js
: database connection configpackage.json
: node dependencies and command scriptstsconfig.json
: typescript compile optionseslint.json
: eslint configwebpack.config.js
: webpack config.env.local
: environment variables to load forlocal
NODE_ENV.env.test
: environment variables to load fortest
NODE_ENVbabel.config.js
: load babel presets for code transpilationjest.config.js
: test configuration (paths of files to test)nodemon.json
: nodemon setting(run nodemon using ts-node and watch the changes)