AngularNodeAppEngine
Angular server application engine. Manages Angular server applications (including localized ones), handles rendering requests, and optionally transforms index HTML before rendering.
handle
Promise<Response | null>Handles an incoming HTTP request by serving prerendered content, performing server-side rendering,
or delivering a static file for client-side rendered routes based on the RenderMode setting.
This method adapts Node.js's IncomingMessage or Http2ServerRequest
to a format compatible with the AngularAppEngine and delegates the handling logic to it.
any- The incoming HTTP request (
IncomingMessageorHttp2ServerRequest).
unknown- Optional context for rendering, such as metadata associated with the request.
Promise<Response | null>A request to https://www.example.com/page/index.html will serve or render the Angular route
corresponding to https://www.example.com/page.
Usage Notes
This class should be instantiated once and used as a singleton across the server-side application to ensure consistent handling of rendering requests and resource management.