(req)
| 11 | |
| 12 | const 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 |
no outgoing calls
no test coverage detected