diff --git a/src/controllers/StatusController.ts b/src/controllers/StatusController.ts new file mode 100644 index 0000000..9578169 --- /dev/null +++ b/src/controllers/StatusController.ts @@ -0,0 +1,17 @@ +import { Get, JsonController } from 'routing-controllers'; +import { OpenAPI } from 'routing-controllers-openapi'; +import { config } from '../config'; + +/** + * The statuscontroller provides simple endpoints concerning basic information about the server. + */ +@JsonController() +export class StatusController { + @Get('/version') + @OpenAPI({ description: "A very basic endpoint that just returns the curent package version." }) + getVersion() { + return { + "version": config.version + } + } +} \ No newline at end of file