all repos — website @ 51cc4389f6dc7947ee34d1b3367876941e8a8fbc

My website

Serve static files

Alan Pearce
commit

51cc4389f6dc7947ee34d1b3367876941e8a8fbc

parent

a25028aa30bf0f3b89a9a7c99192e1a14267fc97

1 file changed, 6 insertions(+), 6 deletions(-)

changed files
M src/index.tssrc/index.ts
@@ -1,10 +1,10 @@
-import { withHtmlLiveReload } from "bun-html-live-reload"; -import Siopao from "siopao"; - -const router = new Siopao(); +import { withHtmlLiveReload } from "bun-html-live-reload" +import serveStatic from "serve-static-bun" -router.get("/status", () => new Response("OK")); +const dir = Bun.argv.length > 2 ? Bun.argv[Bun.argv.length - 1] : "./" export default withHtmlLiveReload({ - fetch: router.fetch.bind(router), + fetch: serveStatic(dir, { + dotfiles: "allow" + }), })