import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions' ; import { TypeOrmModuleOptions } from '@nestjs/typeorm/dist/interfaces/typeorm-options.interface' ; import { TypeOrmModule } from '@nestjs/typeorm' ; const defaultDB = { name : 'default' , type : 'postgres' , host : 'localhost' , port : + process . env . POSTGRES_PORT || 5432 , username : process . env . POSTGRES_USERNAME || 'postgres' , password : process . env . POSTGRES_PASSWORD || 'testingpass' , database : process . env . POSTGRES_DATABASE || 'testingDB' , entities : [ __dirname + '/../**/*.entity{.ts,.js}' ] , synchronize : true , logging : false , cache : true , } ; export const databaseProviders = [ TypeOrmModule . forRoot ( defaultDB ) ] ;