Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ShelterManagersModule } from './shelter-managers/shelter-managers.modul
import { ShelterSupplyModule } from './shelter-supply/shelter-supply.module';
import { PartnersModule } from './partners/partners.module';
import { SupportersModule } from './supporters/supporters.module';
import { HealthModule } from './health/health.module';

@Module({
imports: [
Expand All @@ -26,6 +27,7 @@ import { SupportersModule } from './supporters/supporters.module';
ShelterSupplyModule,
PartnersModule,
SupportersModule,
HealthModule,
],
controllers: [],
providers: [
Expand Down
18 changes: 18 additions & 0 deletions src/health/health.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Test, TestingModule } from '@nestjs/testing';
import { HealthController } from './health.controller';

describe('HealthController', () => {
let controller: HealthController;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
controllers: [HealthController],
}).compile();

controller = module.get<HealthController>(HealthController);
});

it('should be defined', () => {
expect(controller).toBeDefined();
});
});
11 changes: 11 additions & 0 deletions src/health/health.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Controller, Get } from '@nestjs/common';

@Controller('health')
export class HealthController {
@Get()
status() {
return {
state: 'UP',
};
}
}
7 changes: 7 additions & 0 deletions src/health/health.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Module } from '@nestjs/common';
import { HealthController } from './health.controller';

@Module({
controllers: [HealthController],
})
export class HealthModule {}