-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.js
36 lines (36 loc) · 1.21 KB
/
config.js
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
28
29
30
31
32
33
34
35
36
module.exports = require('yargs')
.env('AIRTUNES2MQTT')
.usage('Usage: $0 [options]')
.describe('verbosity', 'possible values: "error", "warn", "info", "debug"')
.describe('name', 'instance name. used as mqtt client id and as prefix for connected topic')
.describe('mqtt-url', 'mqtt broker url. May contain user/password')
.describe('speaker', 'name:host:port or name:host:portStart:portEnd of speaker. May be repeated.')
.describe('port', 'TCP Listen port for audio reception')
.describe('loopback', 'Use Alsa loopback device instead of TCP listener')
.describe('device', 'Alsa loopback device')
.describe('disable-web', 'disable web server')
.describe('web-port', 'web server listening port')
.describe('help', 'show help')
.alias({
h: 'help',
u: 'mqtt-url',
s: 'speaker',
n: 'name',
v: 'verbosity',
p: 'port',
l: 'loopback',
d: 'device'
})
.boolean('loopback')
.default({
'mqtt-url': 'mqtt://127.0.0.1',
name: 'airtunes',
verbosity: 'info',
p: 12346,
d: 'hw:Loopback,1',
'web-port': 8096
})
.demand('speaker')
.version()
.help('help')
.argv;