Skip to content

Commit

Permalink
chore: fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Julink-eth committed May 7, 2024
2 parents 8a6cd8d + 0b9ad63 commit b9f192b
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/poh-verifier/.env.testnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Env
NODE_ENV=testnet
NODE_ENV=test
PORT=3000

# Signer
Expand Down
1 change: 1 addition & 0 deletions packages/poh-verifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@nestjs/core": "^10.3.3",
"@nestjs/platform-express": "^10.3.3",
"@nestjs/swagger": "^7.3.0",
"@nestjs/terminus": "^10.2.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"joi": "^17.12.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/poh-verifier/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { AppController } from './modules/app/app.controller';
import { AppService } from './modules/app/app.service';
import { ApiModule } from './modules/api/api.module';
import { PohModule } from './modules/poh/poh.module';
import { HealthModule } from './modules/health/health.module';

@Module({
imports: [
Expand Down Expand Up @@ -46,6 +47,7 @@ import { PohModule } from './modules/poh/poh.module';
}),
ApiModule,
PohModule,
HealthModule,
],
controllers: [AppController],
providers: [AppService],
Expand Down
12 changes: 12 additions & 0 deletions packages/poh-verifier/src/modules/health/health.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Controller, Get } from '@nestjs/common';
import { HealthService } from './health.service';

@Controller('health')
export class HealthController {
constructor(private healthService: HealthService) {}

@Get()
check() {
return this.healthService.checkHealth();
}
}
12 changes: 12 additions & 0 deletions packages/poh-verifier/src/modules/health/health.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Module } from '@nestjs/common';
import { TerminusModule } from '@nestjs/terminus';
import { HttpModule } from '@nestjs/axios';
import { HealthController } from './health.controller';
import { HealthService } from './health.service';

@Module({
imports: [TerminusModule, HttpModule],
controllers: [HealthController],
providers: [HealthService],
})
export class HealthModule {}
8 changes: 8 additions & 0 deletions packages/poh-verifier/src/modules/health/health.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Injectable } from '@nestjs/common';

@Injectable()
export class HealthService {
checkHealth() {
return { status: 'up' };
}
}
68 changes: 66 additions & 2 deletions pnpm-lock.yaml

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

0 comments on commit b9f192b

Please sign in to comment.