joyent-portal/legacy/control-tower/bin/control-tower
Sérgio Ramos 8295bd6882 chore: initial lerna setup
this shall be a progressive process
2017-05-25 10:56:50 +01:00

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');
});