I am looking into using S3 as part of my serverless environment with Lambda and some others.
I really, really need SEO (so slugs and SSR) and will use ng add @nguniversal/express-engine
in the Angular 13 app.
How does the SSR work if it gets pushed to S3? Like suppose I had a question and answer site like this site and wanted each "page" of a question with answers to be a URL slug and be part of SSR for SEO.
I need help understanding how SSR works and how to create URL slugs I can send to the sitemap?
New to this type of environmeent and angular but my question "page" willbe a basic component.
CodePudding user response:
For Angular SSR to work it require Node environment according to this documentation: https://angular.io/guide/universal
You have to start the application using commands like npm run dev:ssr
This is not possible with S3 setup. You need a Compute resource for this to work. You have following options:
- EC2 instance with application installed on it
- Elastic Beanstalk
- ECS Fargate / EC2 (Dockerised setup) good for long term production setup
- Maybe on Lambda (depends on the site)