backend/src/services/stats.services.js

21 lines
636 B
JavaScript
Raw Normal View History

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"});
var dbmanVer = db.query("versions", {target:"dbmanager"});
log.out(`listServices.meta: fetched server meta`)
let out = {};
out.host = os.hostname();
out.mode = process.env.NODE_ENV;
out.verBkend = vers.app;
out.dat = await dat;
out.dat.verDbman = await dbmanVer.version;
return out;
}
module.exports = {
hits
}