diff options
author | 2022-07-15 03:42:18 +0900 | |
---|---|---|
committer | 2022-07-14 20:42:18 +0200 | |
commit | a4ced701dc961bd6a4c5edb4507f53d4acdec0f4 (patch) | |
tree | 9180d9044c42f17724de1fc9356cb469c11d8ce2 /examples | |
parent | 0d65a1fe104e8740dda8e1f61d9ea77527c5e41e (diff) | |
download | bun-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')
-rw-r--r-- | examples/hono/package.json | 2 | ||||
-rw-r--r-- | examples/hono/src/index.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/hono/package.json b/examples/hono/package.json index 46e977334..5ac888fb7 100644 --- a/examples/hono/package.json +++ b/examples/hono/package.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.1", "name": "@bun-examples/hono", "main": "src/index.js", "devDependencies": { 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, }; |