Runtimes
Runtimes > Cloudflare Workers - itty-router
Itty-router was originally designed for Cloudflare Workers, and remains its optimization target to this day.
js
import { AutoRouter } from 'itty-router'
const router = AutoRouter()
router.get('/', () => 'Success!')
export default router // see note below
It's also possible to setup proper types for the Worker environment and execution context.