monorepo for Hono third-party middleware/helpers/wrappers
 
 
Go to file
Samuel Lippert 855ce4eba4
Rename
2022-08-03 19:03:19 -05:00
.github/workflows Initial commit 2022-08-04 08:54:30 +09:00
deno_dist Initial commit 2022-08-04 08:54:30 +09:00
deno_test Initial commit 2022-08-04 08:54:30 +09:00
src Rename 2022-08-03 19:03:19 -05:00
test Rename 2022-08-03 19:03:19 -05:00
.eslintrc.js Initial commit 2022-08-04 08:54:30 +09:00
.gitignore Initial commit 2022-08-04 08:54:30 +09:00
.prettierrc Initial commit 2022-08-04 08:54:30 +09:00
README.md Initial commit 2022-08-04 08:54:30 +09:00
jest.config.js Initial commit 2022-08-04 08:54:30 +09:00
package.json Add Toucan package 2022-08-03 19:03:13 -05:00
tsconfig.json Initial commit 2022-08-04 08:54:30 +09:00
yarn.lock Add Toucan package 2022-08-03 19:03:13 -05:00

README.md

Hello middleware for Hono

An example project of the third-party middleware for Hono. This middleware add X-Message header to the Response.

Usage

import { hello } from '@honojs/hello'
import { Hono } from 'hono'

const app = new Hono()

app.use('*', hello('Hello!! Hono!!'))
app.get('/', (c) => c.text('foo'))

export default app

Deno

import { serve } from 'https://deno.land/std/http/server.ts'
import { hello } from 'https://deno.land/x/hono_hello/mod.ts'
import { Hono } from 'https://deno.land/x/hono/mod.ts'

const app = new Hono()

app.use('*', hello('Hello!! Hono!!'))
app.get('/', (c) => c.text('foo'))

serve(app.fetch)

Author

Yusuke Wada https://github.com/yusukebe

License

MIT