MCPcopy Create free account
hub / github.com/T-Lab-CUHKSZ/claude-code / fetch

Function fetch

config-ui/server.ts:323–338  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

321const server = Bun.serve({
322 port: PORT,
323 async fetch(req) {
324 const url = new URL(req.url)
325
326 if (url.pathname.startsWith('/api/')) {
327 return handleAPI(req)
328 }
329
330 // Serve index.html for all other routes
331 if (existsSync(HTML_PATH)) {
332 return new Response(readFileSync(HTML_PATH, 'utf-8'), {
333 headers: { 'Content-Type': 'text/html; charset=utf-8' },
334 })
335 }
336
337 return new Response('Config UI not found', { status: 404 })
338 },
339})
340
341console.log(`

Callers 9

preconnectAnthropicApiFunction · 0.85
downloadCaBundleFunction · 0.85
connectMethod · 0.85
client.tsFile · 0.85
discoverOidcFunction · 0.85
acquireIdpIdTokenFunction · 0.85
createAuthFetchFunction · 0.85
makeXaaFetchFunction · 0.85

Calls 3

existsSyncFunction · 0.90
readFileSyncFunction · 0.90
handleAPIFunction · 0.85

Tested by

no test coverage detected