Skip to content

Commit 9e9212f

Browse files
committed
feat: 데이터베이스 postgres로 변경
1 parent b6e3769 commit 9e9212f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

apps/backend/src/app.module.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ import { AuthModule } from './auth/auth.module';
2020
import { UserModule } from './user/user.module';
2121
import { WorkspaceModule } from './workspace/workspace.module';
2222
import { RoleModule } from './role/role.module';
23+
import { TasksModule } from './tasks/tasks.module';
24+
import { ScheduleModule } from '@nestjs/schedule';
2325

2426
@Module({
2527
imports: [
28+
ScheduleModule.forRoot(),
2629
ServeStaticModule.forRoot({
2730
rootPath: path.join(__dirname, '..', '..', 'frontend', 'dist'),
2831
}),
@@ -34,14 +37,14 @@ import { RoleModule } from './role/role.module';
3437
imports: [ConfigModule],
3538
inject: [ConfigService],
3639
useFactory: (configService: ConfigService) => ({
37-
type: 'sqlite',
38-
database: 'db.sqlite',
39-
// type: 'postgres',
40-
// host: configService.get('DB_HOST'),
41-
// port: configService.get('DB_PORT'),
42-
// username: configService.get('DB_USER'),
43-
// password: configService.get('DB_PASSWORD'),
44-
// database: configService.get('DB_NAME'),
40+
// type: 'sqlite',
41+
// database: 'db.sqlite',
42+
type: 'postgres',
43+
host: configService.get('DB_HOST'),
44+
port: configService.get('DB_PORT'),
45+
username: configService.get('DB_USER'),
46+
password: configService.get('DB_PASSWORD'),
47+
database: configService.get('DB_NAME'),
4548
entities: [Node, Page, Edge, User, Workspace, Role],
4649
logging: true,
4750
synchronize: true,
@@ -56,6 +59,7 @@ import { RoleModule } from './role/role.module';
5659
UserModule,
5760
WorkspaceModule,
5861
RoleModule,
62+
TasksModule,
5963
],
6064
controllers: [AppController],
6165
providers: [AppService],

0 commit comments

Comments
 (0)