diff --git a/package.json b/package.json index f85d19d..6fac4ff 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "scripts": { "dev": "bun --hot src/dev/server.tsx", - "test": "bun test" + "test": "tsc --noEmit && bun test" }, "dependencies": { "hono": "^4" diff --git a/src/dev/server.tsx b/src/dev/server.tsx index ef2390e..173f591 100644 --- a/src/dev/server.tsx +++ b/src/dev/server.tsx @@ -1,14 +1,12 @@ #!/usr/bin/env bun -import { Hono } from "hono" -import { serveStatic } from "hono/bun" import index from "./index.html" -const app = new Hono() - -app.use("/public/*", serveStatic({ root: "./" })) -app.get("/", (c) => c.html(index)) - export default { port: 3000, - fetch: app.fetch, + routes: { + "/": index, + }, + static: { + "/public": "./public", + }, }