|
|
@@ -25,6 +25,7 @@ import { LabelModule } from './label/label.module'
|
|
|
import { MomentsModule } from './moments/moments.module'
|
|
|
import { CommentModule } from './comment/comment.module'
|
|
|
import { LikesModule } from './likes/likes.module'
|
|
|
+import { ChatPdfModule } from './chat-pdf/chat-pdf.module';
|
|
|
@Module({
|
|
|
imports: [
|
|
|
DevtoolsModule.register({
|
|
|
@@ -69,6 +70,20 @@ import { LikesModule } from './likes/likes.module'
|
|
|
}
|
|
|
})
|
|
|
}),
|
|
|
+ TypeOrmModule.forRootAsync({
|
|
|
+ imports: [ConfigModule],
|
|
|
+ inject: [ConfigService],
|
|
|
+ useFactory: (config: ConfigService) => ({
|
|
|
+ name: 'db1',
|
|
|
+ type: 'postgres',
|
|
|
+ host: config.get<string>('PG_HOST'),
|
|
|
+ port: config.get<number>('PG_PORT'),
|
|
|
+ username: config.get<string>('PG_USERNAME'),
|
|
|
+ password: config.get<string>('PG_PASSWORD'),
|
|
|
+ database: config.get<string>('PG_DATABASE'),
|
|
|
+ synchronize: true
|
|
|
+ })
|
|
|
+ }),
|
|
|
AliyunModule,
|
|
|
SmsModule,
|
|
|
UsersModule,
|
|
|
@@ -88,6 +103,7 @@ import { LikesModule } from './likes/likes.module'
|
|
|
MomentsModule,
|
|
|
CommentModule,
|
|
|
LikesModule
|
|
|
+ ChatPdfModule
|
|
|
],
|
|
|
controllers: [],
|
|
|
providers: [
|
|
|
@@ -97,4 +113,4 @@ import { LikesModule } from './likes/likes.module'
|
|
|
}
|
|
|
]
|
|
|
})
|
|
|
-export class AppModule { }
|
|
|
+export class AppModule {}
|