Skip to content

Commit e8ca2d5

Browse files
committed
Add healthcheck endpoint
1 parent 5352828 commit e8ca2d5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

backend/src/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { PerplexityService } from './services/perplexity.service';
88
import { PerplexityController } from './controllers/perplexity/perplexity.controller';
99
import { UserController } from './user/user.controller';
1010
import { ReportsModule } from './reports/reports.module';
11-
11+
import { HealthController } from './health/health.controller';
1212
@Module({
1313
imports: [
1414
ConfigModule.forRoot({
@@ -17,7 +17,7 @@ import { ReportsModule } from './reports/reports.module';
1717
}),
1818
ReportsModule,
1919
],
20-
controllers: [AppController, PerplexityController, UserController],
20+
controllers: [AppController, HealthController, PerplexityController, UserController],
2121
providers: [AppService, AwsSecretsService, PerplexityService],
2222
})
2323
export class AppModule implements NestModule {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Controller, Get } from '@nestjs/common';
2+
3+
@Controller('health')
4+
export class HealthController {
5+
@Get()
6+
health() {
7+
return { status: 'ok' };
8+
}
9+
}

0 commit comments

Comments
 (0)