add server file
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m27s

This commit is contained in:
Smile Rex
2026-01-26 17:13:45 +03:00
parent 503bcaddcc
commit fe2927be2e
4 changed files with 49 additions and 1 deletions

17
server.ts Normal file
View File

@@ -0,0 +1,17 @@
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");