Simple NestJS Application Starter Kit which includes Express, TypeOrm, Passport Authentication (WIP), Postgress (Using Docker Compose)
- Docker Composed installed
- Node 14.15.4 and above
- NPM 6.14.10 and above
- Yarn
Note: Not sure if older node and npm would work or not
$ yarn
$ cp .env.example .env
# spinning up the database using docker and Adminer
$ docker-composer up -d
# migrate the db
$ yarn migrate
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
server: db_pg
username: root
password: password
database: db
- Uncomment
db_mysql
indocker-compose.yml
- Comment
db_pg
indocker-compose.yml
- Change
depends_on
fromdb_pg
todb_mysql
- Run
yarn add mysql
- Run
yarn remove pg
- Update
.env
file as follows
DATABASE_TYPE='mysql'
DATABASE_PORT=3306
DATABASE_ROOT_PASSWORD=password
DATABASE_HOST=localhost
DATABASE_USERNAME=root
DATABASE_PASSWORD=password
DATABASE_DB=db
server: db_mysql
username: root
password: password
database: db
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
NestJS Starter Kit is MIT licensed.