aboutsummaryrefslogtreecommitdiff
path: root/examples/hono/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hono/src/index.ts')
-rw-r--r--examples/hono/src/index.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/hono/src/index.ts b/examples/hono/src/index.ts
index 145bd5db0..801955af3 100644
--- a/examples/hono/src/index.ts
+++ b/examples/hono/src/index.ts
@@ -1,10 +1,13 @@
import { Hono } from "hono";
+import { serveStatic } from 'hono/serve-static.bun';
+
+const port = parseInt(process.env.PORT) || 3000;
const app = new Hono();
-const port = parseInt(process.env.PORT) || 3000;
+app.use('/favicon.ico', serveStatic({ path: './public/favicon.ico' }));
-const home = app.get("/", (c) => {
+app.get("/", (c) => {
return c.json({ message: "Hello World!" });
});
@@ -12,5 +15,5 @@ console.log(`Running at http://localhost:${port}`);
export default {
port,
- fetch: home.fetch,
+ fetch: app.fetch
};