diff --git a/src/app.module.ts b/src/app.module.ts index c08ea99f..b8b6223e 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -12,6 +12,7 @@ import { SupplyCategoriesModule } from './supply-categories/supply-categories.mo import { ShelterManagersModule } from './shelter-managers/shelter-managers.module'; import { ShelterSupplyModule } from './shelter-supply/shelter-supply.module'; import { PartnersModule } from './partners/partners.module'; +import { HealthModule } from './health/health.module'; @Module({ imports: [ @@ -24,6 +25,7 @@ import { PartnersModule } from './partners/partners.module'; ShelterManagersModule, ShelterSupplyModule, PartnersModule, + HealthModule, ], controllers: [], providers: [ diff --git a/src/health/health.controller.spec.ts b/src/health/health.controller.spec.ts new file mode 100644 index 00000000..0ab9987b --- /dev/null +++ b/src/health/health.controller.spec.ts @@ -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); + }); + + it('should be defined', () => { + expect(controller).toBeDefined(); + }); +}); diff --git a/src/health/health.controller.ts b/src/health/health.controller.ts new file mode 100644 index 00000000..d489855a --- /dev/null +++ b/src/health/health.controller.ts @@ -0,0 +1,11 @@ +import { Controller, Get } from '@nestjs/common'; + +@Controller('health') +export class HealthController { + @Get() + status() { + return { + state: 'UP', + }; + } +} diff --git a/src/health/health.module.ts b/src/health/health.module.ts new file mode 100644 index 00000000..7476abed --- /dev/null +++ b/src/health/health.module.ts @@ -0,0 +1,7 @@ +import { Module } from '@nestjs/common'; +import { HealthController } from './health.controller'; + +@Module({ + controllers: [HealthController], +}) +export class HealthModule {}