The next command will add the neccesary logic to activate the SRR feature on any Angular app.
npx ng generate universal --client-project your-project-name
To find the name of the app, you need to open the angular.json
file and usually the first property of projects
is the name of the your project.
The next command will instruct the angular cli to build the app with SSR capabilities
npx ng run your-project-name:server
or use the command contained in the script
property of the package.json
npm run build:server-app:prod
The result of this process will be the universal bundle that will be use to run our app with SSR capabilites