UNPKG

@iotize/cli

Version:
30 lines 1.03 kB
"use strict"; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); require("../cli/setup-global"); require("../cli/configure-log"); const relay_1 = __importStar(require("../cli/commands/relay")); let device; if (process.argv.length < 3) { if (!process.env['DEFAULT_IODE_DEVICE']) { process.stdout.write('USAGE: iode-relay YOURDEVICE\r\n'); process.exit(1); } device = process.env['DEFAULT_IODE_DEVICE']; } else { device = process.argv[2]; } let options = new relay_1.RelayOptions(); options.createServer = true; options.device = device; options.protocol = 'tcp://localhost:2000'; options.socketPort = 2000; new relay_1.default().execute(options); //# sourceMappingURL=relay.js.map