Skip to content
Myr

index.ts

This file

Path

runtime-tests/workerd/index.ts

18 lines · 466 bytes · TypeScript

Last changed by

test: move adapter runtime tests into `adapters/*` (#5466)Yusuke Wadabefore adoption645ddd6

History of this file

Take it

The walk stopped after 200 commits: lines older than f0b094d point at it.

Merge commit from forkYusuke Wadabefore adoptionf0b094d

lines 1–18why, one step back
1import { env, getRuntimeKey } from '../../src/helper/adapter'
2import { Hono } from '../../src/hono'3import { getColorEnabledAsync } from '../../src/utils/color'45const app = new Hono()67app.get('/', (c) => c.text(`Hello from ${getRuntimeKey()}`))89app.get('/env', (c) => {10 const { NAME } = env<{ NAME: string }>(c)11 return c.text(NAME)12})1314app.get('/color', async (c) => {15 return c.text((await getColorEnabledAsync()) ? 'True' : 'False')16})1718export default app