12 lines
269 B
TypeScript
12 lines
269 B
TypeScript
import { ConfigService } from '@nestjs/config';
|
|
|
|
export function pgConfig(config: ConfigService): unknown {
|
|
return {
|
|
type: 'postgres',
|
|
url: config.getOrThrow<string>('DATABASE_URL'),
|
|
cache: true,
|
|
synchronize: false,
|
|
autoLoadEntities: true,
|
|
};
|
|
}
|