Skip to content

Commit

Permalink
Adding health check to the service, also added a global prefix for APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
RohitKandimalla committed Apr 16, 2024
1 parent e011e3c commit 3e06b66
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 9 deletions.
164 changes: 157 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@nestjs/core": "^10.3.5",
"@nestjs/jwt": "^10.2.0",
"@nestjs/platform-express": "^10.3.5",
"@nestjs/terminus": "^10.2.3",
"@okta/jwt-verifier": "^3.1.0",
"cqm-models": "4.1.3",
"exceljs": "^4.4.0",
Expand Down
6 changes: 4 additions & 2 deletions src/export.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { Module } from '@nestjs/common';
import { ExportController } from './controllers/export.controller';
import { ExportService } from './services/export.service';
import { AuthModule } from './auth/auth.module';
import { TerminusModule } from '@nestjs/terminus';
import { HealthController } from './health/health.controller';

@Module({
imports: [AuthModule],
controllers: [ExportController],
imports: [AuthModule, TerminusModule],
controllers: [ExportController, HealthController],
providers: [ExportService],
})
export class ExportModule {}
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export async function bootstrap() {
const app = await NestFactory.create(ExportModule, {
logger: ['error', 'log'],
});
app.setGlobalPrefix('/api');
app.enableCors({
origin: [
'http://localhost:9000',
Expand Down

0 comments on commit 3e06b66

Please sign in to comment.