index.js
680 Bytes
process.chdir(__dirname);
const fs = require('fs');
// eslint-disable-next-line import/order
const config = require('./config.json');
global.KOMODO_LOG_LABEL = `KOMODO-CENTER@${(config && typeof config.name === 'string') ? config.name.toUpperCase() : 'EVO-CP'}`;
process.title = global.KOMODO_LOG_LABEL;
// eslint-disable-next-line import/order
const messagingClient = require('komodo-center-messaging-client-lib');
const sdNotify = require('komodo-sdk/sd-notify');
const transport = require('./lib/transport');
messagingClient.setTransport(transport);
require('./lib/apiserver');
require('./lib/webadmin');
fs.writeFileSync('pid.txt', process.pid.toString());
sdNotify();