Add NODE_ENV and version reporting to stats API

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-03-10 22:18:56 +00:00
parent bb61180ab8
commit 461b3cde77

View File

@ -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;
}