MCPcopy Create free account
hub / github.com/p2r3/convert / fetch

Function fetch

buildCache.js:13–18  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

11
12const server = Bun.serve({
13 async fetch (req) {
14 const path = new URL(req.url).pathname.replace("/convert/", "") || "index.html";
15 const file = Bun.file(`${__dirname}/dist/${path}`.replaceAll("..", ""));
16 if (!(await file.exists())) return new Response("Not Found", { status: 404 });
17 return new Response(file);
18 },
19 port: 8080
20});
21

Callers 9

main.tsFile · 0.50
initMethod · 0.50
initMethod · 0.50
loadFluidSynthFunction · 0.50
initMethod · 0.50
initFunction · 0.50
libopenmpt.jsFile · 0.50
instantiateAsyncFunction · 0.50
pandoc.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected