npm install @nestjs/typeorm typeorm
Typeorm.forRoot({
type: 'postgres',
host: process.env.DB_HOST,
port: +process.env.DB_PORT,
username: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME,
entities: ['dist/models/*.js'],
synchronize: process.env.NODE_ENV !== ('production' || 'staging') ? true : false,
autoLoadEntities: true
}),
$ npm install --save @nestjs/typeorm typeorm mysql2