mirror of
https://github.com/honojs/hono.git
synced 2024-11-25 05:07:03 +01:00
ad880dba43
* feat: `env` support enviroment variables for multi runtimes * typo * denoify * fixed ci settings * fixed deno command * comment out lagon test * remove warnings
14 lines
259 B
TypeScript
14 lines
259 B
TypeScript
import { env } from '../src/adapter'
|
|
import { Hono } from '../src/hono'
|
|
|
|
const app = new Hono()
|
|
|
|
app.get('/', (c) => c.text('Hello Wrangler!'))
|
|
|
|
app.get('/env', (c) => {
|
|
const { NAME } = env<{ NAME: string }>(c)
|
|
return c.text(NAME)
|
|
})
|
|
|
|
export default app
|