All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m27s
18 lines
307 B
TypeScript
18 lines
307 B
TypeScript
import { serve } from "bun";
|
|
|
|
serve({
|
|
port: 3000,
|
|
fetch(req) {
|
|
const url = new URL(req.url);
|
|
let path = url.pathname;
|
|
|
|
if (path === "/") path = "/index.html";
|
|
|
|
const file = Bun.file(`./build${path}`);
|
|
|
|
return new Response(file);
|
|
},
|
|
});
|
|
|
|
console.log("Frontend listening on :3000");
|