更新时间:2023-11-22 17:53:40
我上面问题中的主要罪魁祸首是试图通过以下方式在AWS中运行Angular 5应用程序:使用他们选择的node.js作为我的服务器平台。这是我学到的(在 Albert Haff 等人的帮助下:Angular 5使用Node(ngserve)来在编写代码时模拟网络服务器,但是,即使--prod有受支持的标志,也不用在生产中!部署Angular 5应用程序时,很容易(很诱人)选择node.js作为环境通过Beanstalk-但不要这样做!
The cardinal sin in my question above was attempting to run my Angular 5 app in AWS by using their choice for node.js as my server platform. Here is what I learned (with some help from folks like Albert Haff: Angular 5 uses Node (ng serve) to simulate a webserver while you code. However, even though there is a supported flag for --prod, it's not to be used in production! It's really easy (and tempting) to select node.js as the environment when deploying your Angular 5 app via Beanstalk -- but don't do it!
中运行压缩dist / *;执行brotli $ i;完成
for i in dist/*; do brotli $i; done
现在,从这里开始需要连接您的域名。为此,请使用Route 53。
Now, from here you will likely need to connect up your domain name. Use Route 53 for that.