MCPcopy Create free account
hub / github.com/Acode-Foundation/acode-plugin / packZip

Function packZip

esbuild.config.mjs:7–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5function serveUrls(hosts, port) {
6 const names = new Set(
7 (hosts?.length ? hosts : ["127.0.0.1"]).flatMap((host) => {
8 if (host === "0.0.0.0" || host === "::") return ["127.0.0.1"];
9 return [host.includes(":") ? `[${host}]` : host];
10 }),
11 );
12
13 for (const list of Object.values(os.networkInterfaces())) {
14 for (const net of list ?? []) {
15 if (net.internal || net.family !== "IPv4") continue;
16 names.add(net.address);
17 }
18 }

Callers 1

setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected