2022-10-16 17:14:21 +08:00
|
|
|
# Hello middleware for Hono
|
|
|
|
|
2025-03-19 16:53:11 +08:00
|
|
|
[](https://codecov.io/github/honojs/middleware)
|
|
|
|
|
2022-10-16 17:14:21 +08:00
|
|
|
An example project of the third-party middleware for [Hono](https://github.com/honojs/hono).
|
|
|
|
This middleware add `X-Message` header to the Response.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```ts
|
2022-12-24 19:18:26 +08:00
|
|
|
import { hello } from '@hono/hello'
|
2022-10-16 17:14:21 +08:00
|
|
|
import { Hono } from 'hono'
|
|
|
|
|
|
|
|
const app = new Hono()
|
|
|
|
|
|
|
|
app.use('*', hello('Hello!! Hono!!'))
|
|
|
|
app.get('/', (c) => c.text('foo'))
|
|
|
|
|
|
|
|
export default app
|
|
|
|
```
|
|
|
|
|
|
|
|
## Author
|
|
|
|
|
|
|
|
Yusuke Wada <https://github.com/yusukebe>
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
MIT
|