From 1c2b6936d6fd38ec53e7fcbd785373b666d91f2c Mon Sep 17 00:00:00 2001 From: rozetko Date: Thu, 19 Jan 2023 22:53:20 +0300 Subject: [PATCH] return version number from package.json --- src/routes/status.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/status.ts b/src/routes/status.ts index c7d9dc4..65016a5 100644 --- a/src/routes/status.ts +++ b/src/routes/status.ts @@ -1,10 +1,10 @@ import * as express from 'express' -async function deleteTask(req, res) { - res.status(200).send({ version: 123 }); +async function getStatus(req, res) { + res.status(200).send({ version: process.env.npm_package_version }); } export const router = express.Router(); -router.get('/', deleteTask); +router.get('/', getStatus);