angular - 在 AWS 上部署 Angular App 以供练习
问题描述
我有一个 AngularJS 应用程序,我们需要在生产环境中部署它。
截至目前,为了开发,我们将它部署在 AWS EC2 Ubuntu 实例上,并使用 grunt serve 来运行它。
我知道 grunt 应该只用于开发,那么在 AWS 上部署 Angular App 的其他方法是什么?我看到很多关于在 S3/Cloudfront 上部署它的答案。我们不能在生产中使用 EC2 实例和 Nginx/Tomcat 来实现这个目的吗?
谢谢!
解决方案
Benefit of using S3 and Cloudfront for AngularJs App :
S3 server static content and AngularJs is SPA model serve only javascript, HTML and css
Using Cloudfront and S3 content can be serve more faster compare to EC2.
- In cost wise benefit is more compare to EC2
- No need to run grunt while rendering content
- If you used EC2 for SSL certificate required Load Balancer for configuration of HTTPS.
- In CloudFront easy to configure HTTPS using S3.
I suggest go ahead with combination of Route53 + CloudFront + S3 website hosting for AngularJs app. If you need HTTPS you can get certificate from AWS ACM in very low price also.
推荐阅读
- spring-boot - Jetty 9.4 中的 GzipHandler - 增加等待时间
- linux - 如何使用 Bash 脚本在 Linux 中获得对某个 DNS 的 ping 的平均 RTT?
- arrays - 数组中需要对象,创建一个包含工作簿文件中使用的所有最后一行的数组
- javascript - 只运行一次javascript函数
- javascript - 合并和加上具有相同键的数组
- python - 类参数和返回值的类型注解
- python - 尝试使用python代码打开excel
- oracle12c - 筛选分区表 - Oracle
- c# - 如何在 C# 控制台中制作简单的蛇游戏?
- bash - Bash:删除游侠的已删除命令条目