You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(@angular/ssr): add createRequestHandler and createNodeRequestHandler utilities
Introduced the `createRequestHandler` and `createNodeRequestHandler` utilities to expose middleware functions from the `server.ts` entry point for use with Vite.
This provides flexibility in integrating different server frameworks, including Express, Hono, and Fastify, with Angular SSR.
Examples:
**Express**
```ts
export default createNodeRequestHandler(app);
```
**Nest.js**
```ts
const app = await NestFactory.create(AppModule);
export default createNodeRequestHandler(app);
```
**Hono**
```ts
const app = new Hono();
export default createRequestHandler(app.fetch);
```
**Fastify**
```ts
export default createNodeRequestHandler(async (req, res) => {
await app.ready();
app.server.emit('request', req, res);
});
```
0 commit comments