aboutsummaryrefslogtreecommitdiff
path: root/examples/hono/src
diff options
context:
space:
mode:
authorGravatar YOSHIKI <yoshiki.tkg@gmail.com> 2022-07-15 03:42:18 +0900
committerGravatar GitHub <noreply@github.com> 2022-07-14 20:42:18 +0200
commita4ced701dc961bd6a4c5edb4507f53d4acdec0f4 (patch)
tree9180d9044c42f17724de1fc9356cb469c11d8ce2 /examples/hono/src
parent0d65a1fe104e8740dda8e1f61d9ea77527c5e41e (diff)
downloadbun-a4ced701dc961bd6a4c5edb4507f53d4acdec0f4.tar.gz
bun-a4ced701dc961bd6a4c5edb4507f53d4acdec0f4.tar.zst
bun-a4ced701dc961bd6a4c5edb4507f53d4acdec0f4.zip
fix(templates): Fix hono example template (#633)
* Fix hono example template * Update package.json
Diffstat (limited to 'examples/hono/src')
-rw-r--r--examples/hono/src/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/hono/src/index.ts b/examples/hono/src/index.ts
index 2bc0be21c..145bd5db0 100644
--- a/examples/hono/src/index.ts
+++ b/examples/hono/src/index.ts
@@ -2,7 +2,7 @@ import { Hono } from "hono";
const app = new Hono();
-const port = process.env.PORT || 3000;
+const port = parseInt(process.env.PORT) || 3000;
const home = app.get("/", (c) => {
return c.json({ message: "Hello World!" });
@@ -11,6 +11,6 @@ const home = app.get("/", (c) => {
console.log(`Running at http://localhost:${port}`);
export default {
- port: process.env.PORT || 3000,
+ port,
fetch: home.fetch,
};