0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-25 05:07:03 +01:00
hono/test_wrangler/index.ts
Yusuke Wada ad880dba43
feat: env support enviroment variables for multi runtimes (#949)
* feat: `env` support enviroment variables for multi runtimes

* typo

* denoify

* fixed ci settings

* fixed deno command

* comment out lagon test

* remove warnings
2023-03-06 21:12:22 +09:00

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