Add NODE_ENV and version reporting to stats API
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
bb61180ab8
commit
461b3cde77
@ -1,13 +1,16 @@
|
|||||||
const log = require('../utils/log.utils'); // Log Helper
|
const log = require('../utils/log.utils'); // Log Helper
|
||||||
const db = require('../services/dbAccess.services')
|
const db = require('../services/dbAccess.services')
|
||||||
const os = require('os')
|
const os = require('os')
|
||||||
|
const vers = require('../configs/version.configs')
|
||||||
|
|
||||||
async function hits(){
|
async function hits(){
|
||||||
var dat = db.query("meta", {target: "counters"});
|
var dat = db.query("meta", {target: "counters"});
|
||||||
log.out(`listServices.meta: fetched server meta`)
|
log.out(`listServices.meta: fetched server meta`)
|
||||||
let out = {}
|
let out = {};
|
||||||
out.host = os.hostname()
|
out.host = os.hostname();
|
||||||
out.dat = await dat
|
out.mode = process.env.NODE_ENV;
|
||||||
|
out.verBkend = vers.app;
|
||||||
|
out.dat = await dat;
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user