Server-Side Rendering with Angular v19
- Check
server-express.tswith theAppEnginereplacing theCommonEngine server.tsis now used by the vite dev-server if usingoutoutputMode: 'serverinangular.json- Server routes are defined in app.routes.server.ts
- Server side token are accessible (like
REQUEST,REQUEST_CONTEXTetc.)
Note
This is a small demo and does not exhibit every features.
The AppEngine enables running non-node dependent servers !
This demo includes example with h3, elysia, hono and fastify (in addition to express)
ng serve --configuration=fastify(server file)ng serve --configuration=hono(server file)ng serve --configuration=h3(server file)ng serve --configuration=elysia(server file)
By default the demo will use express.
- install the deps with
yarn - run with
ng serveoryarn start
Note:
Elysia requires to run the app with Bun. You can do a prod build with ng b -c elysia and and run bun server.mjs from the dist/ssr-new/server director.