Skip to content

Commit

Permalink
Merge branch 'main' into pierregee/api-deployment-ops
Browse files Browse the repository at this point in the history
  • Loading branch information
pierregee authored Nov 10, 2023
2 parents 2d65329 + 16711a1 commit daf169b
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 8 deletions.
1 change: 1 addition & 0 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"@nestjs/config": "^3.1.1",
"@nestjs/core": "^10.2.5",
"@nestjs/platform-express": "^10.2.5",
"@nestjs/terminus": "^10.1.1",
"@nestjs/throttler": "^5.0.1",
"@waveshq/standard-defichain-jellyfishsdk": "^2.6.1",
"@waveshq/walletkit-core": "^1.3.4",
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { AppController } from './app.controller';
import { AppService } from './app.service';
import { appConfig, ENV_VALIDATION_SCHEMA } from './AppConfig';
import { FaucetModule } from './faucet/FaucetModule';
import { HealthModule } from './health/HealthModule';

@Module({
imports: [
Expand All @@ -22,6 +23,7 @@ import { FaucetModule } from './faucet/FaucetModule';
},
]),
FaucetModule,
HealthModule,
],
controllers: [AppController],
providers: [
Expand Down
15 changes: 15 additions & 0 deletions apps/server/src/health/HealthController.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Controller, Get } from '@nestjs/common';
import { HealthCheck, HealthCheckService } from '@nestjs/terminus';
import { SkipThrottle } from '@nestjs/throttler';

@Controller('health')
export class HealthController {
constructor(private readonly health: HealthCheckService) {}

@SkipThrottle()
@Get()
@HealthCheck()
check() {
return this.health.check([]);
}
}
11 changes: 11 additions & 0 deletions apps/server/src/health/HealthModule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Module } from '@nestjs/common';
import { TerminusModule } from '@nestjs/terminus';

import { HealthController } from './HealthController';

@Module({
imports: [TerminusModule],
controllers: [HealthController],
providers: [],
})
export class HealthModule {}
107 changes: 100 additions & 7 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- "apps/*"
- "packages/*"
- "packages/*"

0 comments on commit daf169b

Please sign in to comment.