@gomani/server@1.2.0
npm size budget5.8 KB / 8.0 KB ✓
@gomani/server
renderPage runs loaders + the layout chain to HTML; renderDocument injects the island manifest and boot only when there are islands; serveStatic serves pretty URLs with Brotli and immutable caching. toNodeListener adapts to a Node server.
API
renderPage
function
renderPage(request: Request, router: Router): Promise<Response>
Resolve a route, run its loaders and layout chain, and render to an HTML Response with resumability.
serveStatic
function
serveStatic(dir: string, options?: StaticOptions): Handler
Serve a built site: pretty-URL → index.html, Brotli, immutable cache for hashed assets.