2022-10-16 17:14:21 +08:00
|
|
|
import type { Handler } from 'hono'
|
|
|
|
|
2022-12-24 20:12:21 +08:00
|
|
|
export const hello = (message: string = 'Hello!'): Handler => {
|
2022-10-16 17:14:21 +08:00
|
|
|
return async (c, next) => {
|
|
|
|
await next()
|
|
|
|
c.res.headers.append('X-Message', message)
|
|
|
|
}
|
|
|
|
}
|