Support for register using a seed host (#51)

This commit is contained in:
Simon J
2021-09-12 15:34:09 +10:00
committed by GitHub
parent 91cc450451
commit be4fcdff24
10 changed files with 219 additions and 44 deletions

View File

@@ -1,4 +1,5 @@
import registrar from "./registrar";
import readConfig from "./config";
import { URLBuilder } from "./url_builder";
const params = process.argv.slice(2);
@@ -9,7 +10,10 @@ if (params.length != 1) {
}
const bonobUrl = new URLBuilder(params[0]!);
registrar(bonobUrl)()
const config = readConfig();
registrar(bonobUrl, config.sonos.discovery)()
.then((success) => {
if (success) {
console.log(`Successfully registered bonob @ ${bonobUrl} with sonos`);