16 lines
280 B
TypeScript
16 lines
280 B
TypeScript
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: 20128
|
|
}, (info) => {
|
|
console.log(`Server is running on http://localhost:${info.port}`)
|
|
})
|