diff options
Diffstat (limited to 'examples/hono/src')
-rw-r--r-- | examples/hono/src/index.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/hono/src/index.ts b/examples/hono/src/index.ts new file mode 100644 index 000000000..2bc0be21c --- /dev/null +++ b/examples/hono/src/index.ts @@ -0,0 +1,16 @@ +import { Hono } from "hono"; + +const app = new Hono(); + +const port = process.env.PORT || 3000; + +const home = app.get("/", (c) => { + return c.json({ message: "Hello World!" }); +}); + +console.log(`Running at http://localhost:${port}`); + +export default { + port: process.env.PORT || 3000, + fetch: home.fetch, +}; |