An open API service indexing awesome lists of open source software.

https://github.com/drivly/hono-oauth-middleware

Hono middleware for OAuth from GitHub, Google, and more
https://github.com/drivly/hono-oauth-middleware

Last synced: 3 months ago
JSON representation

Hono middleware for OAuth from GitHub, Google, and more

Awesome Lists containing this project

README

        

# Hello middleware for Hono

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
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

```ts
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

## License

MIT