将Angular 2应用程序部署到AWS Elastic Beanstalk中 [英] Deploying Angular 2 application into AWS Elastic Beanstalk

查看:101
本文介绍了将Angular 2应用程序部署到AWS Elastic Beanstalk中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am now developing a front-end application using angular 2. This id for communicating with another micro services deploying in cloud. In this Angular 2 application I am not using database interaction.

我需要在弹性beantalk(AWS PaaS)中部署此Angular 2应用程序.部署到云中需要遵循哪些重要步骤?我是角度框架和云平台的新手.如何将Angular 2应用程序部署到AWS Elastic Beanstalk中?

I need to deploy this Angular 2 application in elastic beanstalk (AWS PaaS). What are the important procedure that I need to follow for deploying into cloud? I am new to angular framework and cloud platforms. How can I deploy my Angular 2 application into AWS Elastic Beanstalk?

推荐答案

您是否需要完全弹性beantalk,或者仅使用建议的解决方案部署到AWS?

Do you need exactly to elastic beanstalk or you need just deploy to AWS using any suggested solutions?

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

If second - simplest way is to deploy Angular2 to S3 bucket, configured to serve static files:

  • 转到S3
  • 创建新存储桶
  • 打开水桶
  • 转到属性"标签
  • 选择静态网站托管"
  • 选中使用此存储桶托管网站",并为索引页面和错误页面提供"index.html"
  • 使用"ng build"构建解决方案
  • 将构建结果从"build"文件夹复制到此存储桶中
  • 导航到链接,显示在静态网站托管"部分
  • Go to S3
  • Create new bucket
  • Open bucket
  • Go to "Properties" tab
  • Select "Static website hosting"
  • Check "Use this bucket to host a website" and provide "index.html" for both index and error pages
  • Build solutions using "ng build"
  • Copy build results from "build" folder into this bucket
  • Navigate to links, displayed in "Static website hosting" section

这篇关于将Angular 2应用程序部署到AWS Elastic Beanstalk中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆