15 lines
352 B
TypeScript
15 lines
352 B
TypeScript
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");
|