将 Angular 2 应用程序部署到 AWS Elastic Beanstalk 中

2024-01-04

我现在正在使用 Angular 2 开发一个前端应用程序。该 id 用于与部署在云中的另一个微服务进行通信。在此 Angular 2 应用程序中,我没有使用数据库交互。

我需要在 elastic beanstalk (AWS PaaS) 中部署这个 Angular 2 应用程序。部署到云中需要遵循哪些重要程序?我是角度框架和云平台的新手。如何将我的 Angular 2 应用程序部署到 AWS Elastic Beanstalk 中?


您是否确实需要 Elastic beanstalk,还是只需使用任何建议的解决方案部署到 AWS?

如果第二种 - 最简单的方法是将 Angular2 部署到 S3 存储桶,配置为提供静态文件:

  • Go to S3
  • 创建新存储桶
  • 开桶
  • Go to "Properties" tab enter image description here
  • Select "Static website hosting" enter image description here
  • Check "Use this bucket to host a website" and provide "index.html" for both index and error pages enter image description here
  • 使用“ng build”构建解决方案
  • 将构建结果从“build”文件夹复制到此存储桶中
  • 导航至“静态网站托管”部分中显示的链接
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

将 Angular 2 应用程序部署到 AWS Elastic Beanstalk 中 的相关文章

随机推荐