estia-1a/DevWebStatique/trombinoscope/index.ts

16 lines
352 B
TypeScript
Raw Normal View History

2025-09-22 13:48:07 +02:00
import { file, serve } from "bun";
import front from "./front/index.html";
serve({
routes: {
"/": front,
"/index.html": Response.redirect("/"),
"/resumes/:filename": (req) => {
const { filename } = req.params;
return new Response(file(`./front/resumes/${filename}`));
},
},
});
console.log("Server started on http://localhost:3000");