Setting Up Angular SSR
Add SSR with the Angular CLI.
Adding SSR
The fastest way to enable SSR is the schematic ng add @angular/ssr. It wires up the server build, an Express-based server, and hydration for you.
// terminal
// ng add @angular/ssrNew Projects
When creating a new app you can opt in directly with the SSR flag, so the project starts SSR-ready.
// ng new my-app --ssr