aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/hono/package.json2
-rw-r--r--examples/hono/public/favicon.icobin0 -> 15406 bytes
-rw-r--r--examples/hono/readme.md4
-rw-r--r--examples/hono/src/index.ts9
4 files changed, 11 insertions, 4 deletions
diff --git a/examples/hono/package.json b/examples/hono/package.json
index 7e99418db..475c1ed39 100644
--- a/examples/hono/package.json
+++ b/examples/hono/package.json
@@ -11,4 +11,4 @@
"start": "bun run src/index.ts"
},
"module": "src/index.js"
-}
+} \ No newline at end of file
diff --git a/examples/hono/public/favicon.ico b/examples/hono/public/favicon.ico
new file mode 100644
index 000000000..543164354
--- /dev/null
+++ b/examples/hono/public/favicon.ico
Binary files differ
diff --git a/examples/hono/readme.md b/examples/hono/readme.md
index 992ca277e..20b15e3ea 100644
--- a/examples/hono/readme.md
+++ b/examples/hono/readme.md
@@ -9,9 +9,13 @@ bun create hono ./NAME_HERE
```
### Development
+
```
bun run start
```
Open http://localhost:3000 with your browser to see the result.
+### For more information
+
+See <https://honojs.dev/> \ No newline at end of file
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
};
ions'>-1/+37 2022-06-22Slightly customize the `events` polyfill so it uses ESMGravatar Jarred Sumner 1-1/+522 2022-06-22Fix memory bugs in escapeHTML & arrayBufferToStringGravatar Jarred Sumner 1-65/+61