@lucid-softworks/http-app
v0.1.0
Published
A compact composition root for HTTP routes, middleware, and errors.
Maintainers
Readme
@lucid-softworks/http-app
A compact composition root for routes, middleware, and problem responses.
import { HttpApp } from "@lucid-softworks/http-app";
const app = new HttpApp().use(logging).get("/health", () => new Response("ok"));
const response = await app.fetch(request);Routes use HttpRouter, middleware uses onion composition, and thrown values
become safe problem responses. handler() can be passed directly to a runtime
adapter such as http-server-node.
