but when i'm using configService
return {
type: 'postgres',
host: configService.get<string>('DB_HOST', 'localhost'),
port: configService.get<number>('DB_PORT', 5432),
username: configService.get<string>('DB_USERNAME'),
password: configService.get<string>('DB_PASSWORD'),
database: configService.get<string>('DB_DATABASE_NAME'),
entities: [],
synchronize: true,
logging: true
};
.env
DB_HOST=localhost,
DB_PORT=5432,
DB_USERNAME=postgres,
DB_PASSWORD=some-password,
DB_DATABASE_NAME=postgres