-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcli.js
More file actions
27 lines (23 loc) · 772 Bytes
/
cli.js
File metadata and controls
27 lines (23 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /usr/bin/env node
const yargs = require("yargs");
const DMXWebRTC = require("./DMXWebRTC.js");
const DEFAULT_WS_PORT = 5214;
const DEFAULT_UDP_PORT = 6454;
const usage = "\nUsage: DMXWebRTC -w <web_socket_port> -u <udp_port>";
const options = yargs
.usage(usage)
.option("w", {
alias: "websocket-port",
describe: "Sets up port number of the web socket server instance used for signaling.",
type: "number",
demandOption: false
})
.option("u", {
alias: "udp-port",
describe: "Port number of the ArtNET server from which data will be intercepted and/or forwareded through WebRTC.",
type: "number",
demandOption: false
})
.help(true)
.argv;
DMXWebRTC.init(yargs.argv.w || DEFAULT_WS_PORT, yargs.argv.u || DEFAULT_UDP_PORT);