added the mDNS options to the example config
This commit is contained in:
parent
1e3021c669
commit
be67f04afa
|
@ -73,9 +73,11 @@ function readConfigAndRun(args) {
|
||||||
if (!config.dns) {
|
if (!config.dns) {
|
||||||
config.dns = { modules: { name: 'proxy', port: 3053 } };
|
config.dns = { modules: { name: 'proxy', port: 3053 } };
|
||||||
}
|
}
|
||||||
if (!config.mdns) {
|
// Use Object.assign to add any properties needed but not defined in the mdns config.
|
||||||
config.mdns = { port: 5353, broadcast: '224.0.0.251', ttl: 300 };
|
// It will first copy the defaults into an empty object, then copy any real config over that.
|
||||||
}
|
var mdnsDefaults = { port: 5353, broadcast: '224.0.0.251', ttl: 300 };
|
||||||
|
config.mdns = Object.assign({}, mdnsDefaults, config.mdns || {});
|
||||||
|
|
||||||
if (!config.tcp) {
|
if (!config.tcp) {
|
||||||
config.tcp = {};
|
config.tcp = {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,3 +52,9 @@ http:
|
||||||
domains:
|
domains:
|
||||||
- '*.localhost.daplie.me'
|
- '*.localhost.daplie.me'
|
||||||
root: '/srv/www/:hostname'
|
root: '/srv/www/:hostname'
|
||||||
|
|
||||||
|
mdns:
|
||||||
|
disabled: false
|
||||||
|
port: 5353
|
||||||
|
broadcast: '224.0.0.251'
|
||||||
|
ttl: 300
|
||||||
|
|
Loading…
Reference in New Issue