2022-05-26 00:09:01 +00:00
|
|
|
import { Hono } from '../../dist/hono'
|
2022-05-12 23:48:04 +00:00
|
|
|
//import { Hono } from 'hono'
|
2021-12-27 23:51:05 +00:00
|
|
|
|
2022-05-26 00:09:01 +00:00
|
|
|
const hono = new Hono()
|
2022-01-27 00:09:54 +00:00
|
|
|
hono.get('/user', (c) => c.text('User'))
|
|
|
|
hono.get('/user/comments', (c) => c.text('User Comments'))
|
|
|
|
hono.get('/user/avatar', (c) => c.text('User Avatar'))
|
|
|
|
hono.get('/user/lookup/email/:address', (c) => c.text('User Lookup Email Address'))
|
|
|
|
hono.get('/event/:id', (c) => c.text('Event'))
|
|
|
|
hono.get('/event/:id/comments', (c) => c.text('Event Comments'))
|
|
|
|
hono.post('/event/:id/comments', (c) => c.text('POST Event Comments'))
|
|
|
|
hono.post('/status', (c) => c.text('Status'))
|
|
|
|
hono.get('/very/deeply/nested/route/hello/there', (c) => c.text('Very Deeply Nested Route'))
|
2021-12-27 23:51:05 +00:00
|
|
|
hono.get('/user/lookup/username/:username', (c) => {
|
2022-05-26 00:09:01 +00:00
|
|
|
return new Response(`Hello ${c.req.param('username')}`)
|
2021-12-27 23:51:05 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
hono.fire()
|