app.module.ts
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Module } from '@nestjs/common'
import { GraphQLModule } from '@nestjs/graphql'
import { TypeOrmModule } from '@nestjs/typeorm'
import * as path from 'path'
import { AppController } from './app.controller'
import { AppService } from './app.service'
import { MypageModule } from './mypage/mypage.module'
import { PostModule } from './post/post.module'
import { CommentModule } from './comment/comment.module'
import { UserModule } from './user/user.module'
import { LikeableModule } from './likeable/likeable.module'
@Module({
imports: [
GraphQLModule.forRoot({
autoSchemaFile: path.join(
__dirname,
'../../shared/src/graphql/api/api.graphql',
),
sortSchema: true,
}),
TypeOrmModule.forRoot({
type: 'sqlite',
database: 'database.db',
entities: ['dist/**/*.entity{.ts,.js}'],
synchronize: false,
logging: false,
}),
MypageModule,
PostModule,
CommentModule,
UserModule,
LikeableModule,
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}