summaryrefslogtreecommitdiff
path: root/src/index.ts
blob: bc1cc19542b239bead1ef2c913ea112ead9d7797 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { serve } from '@hono/node-server'
import { Hono } from 'hono'

const app = new Hono()

app.get('/', (c) => {
  return c.text('Hello Hono!')
})

serve({
  fetch: app.fetch,
  port: 3000
}, (info) => {
  console.log(`Server is running on http://localhost:${info.port}`)
})