Nest.js, TypeORM
$ npm install
$ npm install # install dependencies
$ npm run set # execute mysql container
$ npm run migrate # execute all migration files
$ npm run start:dev # run development server (watch mode)
you should execute docker-compose to run development server
# execute docker-compose
$ npm run set
# clear docker containers
$ npm run set:down
# run
$ npm run start
# development - watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
We use migrations to manage database changes
# generate migation file by codebase change
# e.g. npm run makemigrations UpdateUser
# you can find generated file in src/database/migrations
$ npm run makemigrations <MIGRATION_NAME>
# apply existing migration files
$ npm run migrate
# revert last-applied migration
$ npm run migrate:revert
# list applied migrations
$ npm run migrations
Includes lint, type, unit test
# lint
$ npm run check:lint
# type check
$ npm run check:type
# unit test
$ npm run check:test
# run all checks parallely (it's fast!!)
$ npm run check
Commits pushed to the main
branch are automatically deployed. (via GitHub Action)