Skip to content

Commit af0245d

Browse files
committed
Add /health endpoint
1 parent 28c6fdb commit af0245d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ts/server/src/app.controller.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Controller, Post, Body, HttpCode, UseFilters, Query } from '@nestjs/common';
1+
import { Controller, Post, Body, HttpCode, UseFilters, Query, Get } from '@nestjs/common';
22
import { AppService } from './app.service';
33
import { Resource } from 'fhir/r4b';
44
import * as fhirpath_r4_model from 'fhirpath/fhir-context/r4';
@@ -43,7 +43,7 @@ export class AppController {
4343
@Post('aidbox/parse-template')
4444
@HttpCode(200)
4545
resolveTemplateAidbox(@Body() body: Template, @Query() query: Options): object {
46-
const { context, template, strict } = body;
46+
const { context, template, strict } = body;
4747

4848
return this.appService.resolveTemplate(
4949
containsQuestionnaireResponse(context) ? context.QuestionnaireResponse : context,
@@ -53,4 +53,10 @@ export class AppController {
5353
query.strict ?? strict ?? false,
5454
);
5555
}
56+
57+
@Get('health')
58+
@HttpCode(200)
59+
health() {
60+
return { status: 'ok' };
61+
}
5662
}

0 commit comments

Comments
 (0)