NestJS - Database with TypeORM
Which of the following is the correct way to configure TypeORM for a PostgreSQL database in a NestJS module?
type: 'postgres' and default port 5432.TypeOrmModule.forRoot({
type: 'postgres',
host: 'localhost',
port: 5432,
username: 'user',
password: 'pass',
database: 'mydb',
entities: [User],
synchronize: true,
}).TypeOrmModule.forRoot({
type: 'postgres',
host: 'localhost',
port: 5432,
username: 'user',
password: 'pass',
database: 'mydb',
entities: [User],
synchronize: true,
}) correctly configures PostgreSQL in NestJS.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions