about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/index.ts b/src/index.ts
index 8c0a3ba..59913b3 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,10 +1,10 @@
-import { withHtmlLiveReload } from "bun-html-live-reload";
-import Siopao from "siopao";
+import { withHtmlLiveReload } from "bun-html-live-reload"
+import serveStatic from "serve-static-bun"
 
-const router = new Siopao();
-
-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"
+  }),
 })