blob: 801955af368909acf7076d6a6dd1546981b5ade1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { Hono } from "hono";
import { serveStatic } from 'hono/serve-static.bun';
const port = parseInt(process.env.PORT) || 3000;
const app = new Hono();
app.use('/favicon.ico', serveStatic({ path: './public/favicon.ico' }));
app.get("/", (c) => {
return c.json({ message: "Hello World!" });
});
console.log(`Running at http://localhost:${port}`);
export default {
port,
fetch: app.fetch
};
|