Skip to content

NestJS Simple Starter Kit with TypeOrm, Passport, Postgres, Docker Compose

License

Notifications You must be signed in to change notification settings

Nextacloud/NestJS-Starter-Kit

Repository files navigation

Description

Simple NestJS Application Starter Kit which includes Express, TypeOrm, Passport Authentication (WIP), Postgress (Using Docker Compose)

Requirement

  1. Docker Composed installed
  2. Node 14.15.4 and above
  3. NPM 6.14.10 and above
  4. Yarn

Note: Not sure if older node and npm would work or not

Installation

$ yarn
$ cp .env.example .env

Running the app

# 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

Logging in to Adminer for Postgres

server: db_pg
username: root
password: password
database: db

Using MySQL

  1. Uncomment db_mysql in docker-compose.yml
  2. Comment db_pg in docker-compose.yml
  3. Change depends_on from db_pg to db_mysql
  4. Run yarn add mysql
  5. Run yarn remove pg
  6. 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

Logging in to Adminer for MySQL

server: db_mysql
username: root
password: password
database: db

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

License

NestJS Starter Kit is MIT licensed.

About

NestJS Simple Starter Kit with TypeOrm, Passport, Postgres, Docker Compose

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published