简体   繁体   中英

Deploy angular universal app to aws s3 bucket not working ssr

I was working with angular9 application for making it SEO friendly i need to switch to Angular Universal SSR. I have executed command as below

  • ng add @nguniversal/express-engine
  • npm run dev:ssr
  • npm run build:ssr
  • npm run serve:ssr

while execution i face some problems which i solved. The problem is when we run npm run dev:ssr whole application is working fine at development mode and in page source code able to see meta tags.

在此处输入图像描述

Source Code (dev:ssr) 在此处输入图像描述

But when i run npm run build:ssr & npm run serve:ssr command i am facing issue with application UI but meta tags are working fine.

I want to deploy my angular universal app to AWS S3 bucket. In dist folder browser & Server folder gets created. What folder i need to upload.. i tried both folders, individual folders and other things but no luck.

Please help me with this i already waste 2 3 days.. give me proper way..

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM