8295bd6882
this shall be a progressive process
22 lines
571 B
JavaScript
22 lines
571 B
JavaScript
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
const Fs = require('fs');
|
|
const ControlTower = require('../');
|
|
|
|
|
|
const cert = process.env.CMON_CERT_PATH ? Fs.readFileSync(process.env.CMON_CERT_PATH) : process.env.CMON_CERT;
|
|
const key = process.env.CMON_KEY_PATH ? Fs.readFileSync(process.env.CMON_KEY_PATH) : process.env.CMON_KEY;
|
|
const datacenter = 'cmon.us-sw-1.triton.zone:9163';
|
|
|
|
const tower = new ControlTower({ cmon: { cert, key, datacenter } });
|
|
tower.start((err) => {
|
|
if (err) {
|
|
console.error(err);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log('Control Tower Started');
|
|
});
|