MCPcopy Create free account
hub / github.com/CopilotKit/OpenGenerativeUI / GET

Function GET

apps/app/src/app/api/pick/ip/route.ts:5–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4/** Returns the machine's LAN IPv4 address so phones on the same network can connect. */
5export async function GET() {
6 const nets = networkInterfaces();
7 for (const name of Object.keys(nets)) {
8 for (const net of nets[name] ?? []) {
9 if (!net.internal && net.family === "IPv4") {
10 return NextResponse.json({ ip: net.address });
11 }
12 }
13 }
14 return NextResponse.json({ ip: null });
15}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected