2023-02-09 20:34:53 +00:00
|
|
|
const log = require('../utils/log.utils'); // Log Helper
|
|
|
|
const db = require('../services/dbAccess.services')
|
|
|
|
const os = require('os')
|
2023-03-10 22:18:56 +00:00
|
|
|
const vers = require('../configs/version.configs')
|
2023-02-09 20:34:53 +00:00
|
|
|
|
|
|
|
async function hits(){
|
2023-02-16 10:39:19 +00:00
|
|
|
var dat = db.query("meta", {target: "counters"});
|
2023-03-13 19:39:10 +00:00
|
|
|
var dbmanVer = db.query("versions", {target:"dbmanager"});
|
2023-02-09 20:34:53 +00:00
|
|
|
log.out(`listServices.meta: fetched server meta`)
|
2023-03-10 22:18:56 +00:00
|
|
|
let out = {};
|
|
|
|
out.host = os.hostname();
|
|
|
|
out.mode = process.env.NODE_ENV;
|
|
|
|
out.verBkend = vers.app;
|
|
|
|
out.dat = await dat;
|
2023-03-13 19:39:10 +00:00
|
|
|
out.dat.verDbman = await dbmanVer.version;
|
2023-02-09 20:34:53 +00:00
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
hits
|
|
|
|
}
|