chore: Update the start-sdk to use dependencies

This commit is contained in:
BluJ
2023-04-17 13:39:09 -06:00
parent 78076387ef
commit 4b74906ada
6 changed files with 73 additions and 110 deletions

View File

@@ -4,10 +4,12 @@ import { LocalBinding } from "./LocalBinding";
export class LocalPort {
constructor(readonly effects: Effects, readonly id: string) {}
async bindLan(internalPort: number) {
const [localAddress, ipAddress] = await this.effects.bindLan({
const port = await this.effects.bindLan({
internalPort,
name: this.id,
});
const localAddress = `${await this.effects.getLocalHostname()}:${port}`;
const ipAddress = `${await this.effects.getIPHostname()}:${port}`;
return new LocalBinding(localAddress, ipAddress);
}
}

View File

@@ -14,4 +14,4 @@ export class NetworkBuilder {
getPort(id: string) {
return new LocalPort(this.effects, id);
}
}
}