aboutsummaryrefslogtreecommitdiff
path: root/examples/hono/src/index.ts
blob: 2bc0be21c1702c99b7e9e6aa2e5e4826fdacd414 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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,
};