mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 04:11:57 +00:00
chore: Update the start-sdk to use dependencies
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@ export class NetworkBuilder {
|
||||
getPort(id: string) {
|
||||
return new LocalPort(this.effects, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user