Adapters

Web

Run your h3 apps in edge runtimes with Web API compatibility.

In order to run h3 apps in web compatible edge runtimes supporting fetch API with Request and Response, use toWebHandler adapter to convert h3 app into a fetch-like function.

Usage

First, create app entry:

Create web entry:

Local testing

You can test adapter using any compatible JavaScript runtime by passing a Request object.

Run with node ./web.test.mjs.