From e506fa0778f1b3ab22b3668831f2bfde1d52350a Mon Sep 17 00:00:00 2001 From: "E. Lynette Rayle" Date: Tue, 16 Jan 2024 16:30:13 -0500 Subject: [PATCH] add sha to status endpoint --- routes/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes/index.js b/routes/index.js index a9a01f38f..0baee989f 100644 --- a/routes/index.js +++ b/routes/index.js @@ -4,6 +4,10 @@ const express = require('express') const router = express.Router() router.get('/', function(req, res) { + const sha = require('child_process') + .execSync('git rev-parse HEAD') + .toString().trim() + const msg = `{ "status": "OK", "sha": "${sha}" }` res.status(200).send({ status: 'OK' }) })