MCPcopy Create free account
hub / github.com/MemTensor/MemOS / getLocalIPs

Method getLocalIPs

packages/memos-core/src/viewer/server.ts:3064–3075  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3062 }
3063
3064 private getLocalIPs(): string[] {
3065 const nets = os.networkInterfaces();
3066 const ips: string[] = [];
3067 for (const name of Object.keys(nets)) {
3068 for (const net of nets[name] ?? []) {
3069 if (net.family === "IPv4" && !net.internal) {
3070 ips.push(net.address);
3071 }
3072 }
3073 }
3074 return ips;
3075 }
3076
3077 private serveLocalIPs(res: http.ServerResponse): void {
3078 const ips = this.getLocalIPs();

Callers 3

serveLocalIPsMethod · 0.95
handleSaveConfigMethod · 0.95

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected