show people

master
Valerie 2021-06-15 20:19:39 -04:00
parent d799d4dc7a
commit 655cb671f9
1 changed files with 11 additions and 4 deletions

View File

@ -7,10 +7,14 @@ const mdns = bonjour();
const ID = uuid.v4(); const ID = uuid.v4();
let devices = []; let devices = [];
type Player = { class Player {
name: string, name: string;
address: string, address: string;
port: number port: number;
toString() {
return ` ${this.name}`;
}
} }
const network = { const network = {
@ -33,4 +37,7 @@ mdns.find({
type: 'dfi' type: 'dfi'
}, (service) => { }, (service) => {
log.info('found network device', service); log.info('found network device', service);
const p = new Player();
p.name = service.fqdn;
devices.push(p);
}); });