From 461b3cde7752e16f9d33f22eb49c254ddaaa167b Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Fri, 10 Mar 2023 22:18:56 +0000 Subject: [PATCH] Add NODE_ENV and version reporting to stats API Signed-off-by: Fred Boniface --- src/services/stats.services.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/services/stats.services.js b/src/services/stats.services.js index 572c361..b057a98 100644 --- a/src/services/stats.services.js +++ b/src/services/stats.services.js @@ -1,13 +1,16 @@ const log = require('../utils/log.utils'); // Log Helper const db = require('../services/dbAccess.services') const os = require('os') +const vers = require('../configs/version.configs') async function hits(){ var dat = db.query("meta", {target: "counters"}); log.out(`listServices.meta: fetched server meta`) - let out = {} - out.host = os.hostname() - out.dat = await dat + let out = {}; + out.host = os.hostname(); + out.mode = process.env.NODE_ENV; + out.verBkend = vers.app; + out.dat = await dat; return out; }