diff --git a/src/packages/health/health.ts b/src/packages/health/health.ts index 20d2252..aa7aff0 100644 --- a/src/packages/health/health.ts +++ b/src/packages/health/health.ts @@ -1,4 +1,5 @@ import type { Express } from 'express'; +import { getEnv } from '../../env.js'; export default (app: Express) => { /** @@ -29,4 +30,30 @@ export default (app: Express) => { const uptimeMinutes = process.uptime() / 60; res.json({ timestamp, uptimeMinutes }); }); + + /** + * @swagger + * /version: + * get: + * produces: + * - application/json + * responses: + * 200: + * description: Version metrics + * content: + * application/json: + * schema: + * properties: + * gateway_version: + * description: The current version of the Aerie Gateway. + * type: string + * summary: Get the current version of the Gateway and Database Schema + * tags: + * - Version + */ + app.get('/version', async (_, res) => { + res.json({ + version: getEnv().VERSION, + }); + }); };