forked from WilliamMolina/lgtv2mqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
25 lines (24 loc) · 718 Bytes
/
config.js
File metadata and controls
25 lines (24 loc) · 718 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
const config = require('yargs')
.usage('Usage: $0 [options]')
.describe('v', 'possible values: "error", "warn", "info", "debug"')
.describe('n', 'instance name. used as mqtt client id and as prefix for connected topic')
.describe('t', 'hostname or ip address of webos tv')
.describe('u', 'mqtt broker url. See https://github.com/mqttjs/MQTT.js#connect-using-a-url')
.describe('h', 'show help')
.alias({
h: 'help',
n: 'name',
t: 'tv',
u: 'url',
v: 'verbosity'
})
.default({
u: 'mqtt://127.0.0.1',
n: 'lgtv',
t: 'lgwebostv',
v: 'info'
})
.version()
.help('help')
.argv;
module.exports = config;