mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
16 lines
472 B
TypeScript
16 lines
472 B
TypeScript
import registrar from "./registrar";
|
|
import { URLBuilder } from "./url_builder";
|
|
|
|
const params = process.argv.slice(2);
|
|
|
|
if (params.length != 1) {
|
|
console.error("Usage: register [URL to bonob]");
|
|
process.exit(1);
|
|
}
|
|
|
|
const bonobUrl = new URLBuilder(params[0]!);
|
|
registrar(bonobUrl)().then((success) => {
|
|
if (success) console.log(`Successfully registered bonob @ ${bonobUrl} with sonos`);
|
|
else console.error(`Failed registering bonob @ ${bonobUrl} with sonos`);
|
|
});
|