FlareAppCF
class FlareAppCF extends FlareAppBase<"sync">Compiled Cloudflare application returned by host.build(), exposing the export terminal.
- export: the Worker fetch handler (the module default export).
How you get one
Section titled “How you get one”Handed to you by the framework; see Deploy.
Properties
Section titled “Properties”host: IFlareHost<"sync">http: HttpArc<"sync">Methods
Section titled “Methods”export()
Section titled “export()”export(): WorkerExportedHandleStarts the shared graph and returns the Worker fetch handler, seeded with the isolate env on first request.
returns WorkerExportedHandle
test()
Section titled “test()”test(_opts?: AppTestOptions): Promise<TestAppHandle>Starts the application in test mode and returns a TestAppHandle
for driving synthetic requests. Mirrors how run() (Node) returns a
NodeRunHandle and export() (CF) returns a { fetch } handle.
The base implementation throws when FLARE_MODE=test was not set, so host.build()
returned a production app rather than the test variant. Set FLARE_MODE=test
before importing the host module (vitest: test.env.FLARE_MODE = 'test').
FlareTestApp overrides with the real implementation.
_opts? AppTestOptions
returns Promise<TestAppHandle>
Learn: Deploy