feat: expose health and demo character APIs
This commit is contained in:
7
apps/api/src/health/health.controller.spec.ts
Normal file
7
apps/api/src/health/health.controller.spec.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { HealthController } from './health.controller';
|
||||
|
||||
describe('HealthController', () => {
|
||||
it('returns an ok status for liveness checks', () => {
|
||||
expect(new HealthController().getHealth()).toEqual({ status: 'ok' });
|
||||
});
|
||||
});
|
||||
9
apps/api/src/health/health.controller.ts
Normal file
9
apps/api/src/health/health.controller.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
|
||||
@Controller('health')
|
||||
export class HealthController {
|
||||
@Get()
|
||||
getHealth() {
|
||||
return { status: 'ok' };
|
||||
}
|
||||
}
|
||||
7
apps/api/src/health/health.module.ts
Normal file
7
apps/api/src/health/health.module.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { HealthController } from './health.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [HealthController],
|
||||
})
|
||||
export class HealthModule {}
|
||||
Reference in New Issue
Block a user