aboutsummaryrefslogtreecommitdiff
path: root/examples/hono/src/index.ts
blob: 145bd5db08cf7f9504a24bf3d1ea59d83d0e6fca (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 = parseInt(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,
  fetch: home.fetch,
};