🚀 release: v3.0.0

This commit is contained in:
Amruth Pillai
2022-03-02 17:44:11 +01:00
parent 2175256310
commit 295172687b
352 changed files with 30932 additions and 0 deletions

View File

@ -0,0 +1,23 @@
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
@Module({
imports: [
TypeOrmModule.forRootAsync({
imports: [ConfigModule],
inject: [ConfigService],
useFactory: (configService: ConfigService) => ({
type: 'postgres',
host: configService.get<string>('postgres.host'),
port: configService.get<number>('postgres.port'),
username: configService.get<string>('postgres.username'),
password: configService.get<string>('postgres.password'),
database: configService.get<string>('postgres.database'),
synchronize: configService.get<string>('app.environment') === 'development',
autoLoadEntities: true,
}),
}),
],
})
export class DatabaseModule {}

View File

@ -0,0 +1,3 @@
export enum PostgresErrorCode {
UniqueViolation = '23505',
}