FlareAppNode
class FlareAppNode extends FlareAppBase<"async">Compiled Flare application for Node.js. Serves requests via the built-in node:http server with
graceful shutdown on signal or fatal error.
How you get one
Section titled “How you get one”Handed to you by the framework; see Run and shutdown.
Properties
Section titled “Properties”host: IFlareHost<"async">http: HttpArc<"async">Methods
Section titled “Methods”run(options?: NodeRunOptions): NodeRunHandleStarts the HTTP server, binds process signal handlers, and returns a handle for stopping the application without exiting the host process.
options? NodeRunOptions
returns NodeRunHandle
Throws:
If invoked more than once on the same app instance.
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: Run and shutdown