mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
16 lines
456 B
TypeScript
16 lines
456 B
TypeScript
import { resolve } from "path";
|
|
|
|
const development = process.env.NODE_ENV !== "production";
|
|
export default {
|
|
fetch(req: Request) {
|
|
Bun.file;
|
|
return new Response(Bun.file(resolve(req.url.substring(1))));
|
|
},
|
|
|
|
// hostname: "0.0.0.0",
|
|
// port: parseInt(process.env.PORT || "443", 10),
|
|
// keyFile: process.env.SSL_KEY_FILE || "./key.pem",
|
|
// certFile: process.env.SSL_CERTIFICATE_FILE || "./cert.pem",
|
|
development,
|
|
} as Bun.Serve;
|