import { serveDir, serveFile } from "jsr:@std/http/file-server";

Deno.serve((req: Request) => {
	const pathname = new URL(req.url).pathname;

	if (pathname.startsWith("/static")) {
		return serveDir(req, {
			fsRoot: "static",
			urlRoot: "static",
		});
	} else {
		return serveFile(req, "static/index.html");
	}
});
