commit
7b999a670c
243 files changed
+24818
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
||||
|
||||
export function pgConfig(config: ConfigService): TypeOrmModuleOptions {
|
||||
return {
|
||||
type: 'postgres',
|
||||
url: config.getOrThrow<string>('DATABASE_URL'),
|
||||
cache: true,
|
||||
synchronize: false,
|
||||
autoLoadEntities: true,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user