如何将纯Angular应用程序从Visual Studio Team System部署到Azure网站 [英] How to deploy a pure Angular application from Visual Studio Team System to Azure websites

查看:102
本文介绍了如何将纯Angular应用程序从Visual Studio Team System部署到Azure网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何将纯Angular应用程序部署到Azure网站吗?

我在VSTS Git源代码管理中有一个Angular 2应用程序(例如Angular 2快速入门).如何通过设置VSTS版本将应用程序部署到Azure网站?

我看到了将node.js(带角度的)部署到Azure的文档: https://msdn.microsoft.com/en-us/library/vs/alm/build/azure/nodejs .我确实按照文档中的说明成功地将许多有角度的应用程序部署到Azure网站.但是我在Angular应用程序中不对node.js进行任何使用.我希望我可以将纯Angular应用程序部署到Azure网站.

以前,我使用Visual Studio创建一个空项目来包含我的Angular应用程序.这些项目可以轻松部署到Azure网站.现在,我正在使用VS代码,并且不想创建任何Visual Studio解决方案.我不知道如何仅使用纯Angular代码在VSTS中设置连续部署.

我知道我可能仍然需要使用IIS,并且需要一些设置/配置.但是我只是不想在Visual Studio项目中做它们.

解决方案

使用node.js创建部署程序包,然后通过"Azure Web App部署"任务来部署程序包是一种方便的方法来部署到Azure站点./p>

但是,如果您不喜欢这样做,则可以创建批处理/power-shell脚本,以通过FTP方法在Azure Web App中复制部署文件.请参阅此链接以获取详细信息:通过将文件复制到以下位置进行部署手动Azure

您还可以尝试直接从Source Control部署它:https://msdn.microsoft.com/en-us/library/vs/alm/build/azure/nodejs. I did successfully deploy many of my angular applications to Azure websites following the instructions in the document. But I don't use anything with node.js in my Angular application. I hope that I can just deploy my pure Angular application to azure websites.

Previously, I used Visual Studio to create empty project to contain my Angular application. These kind of projects can be easily deployed to Azure websites. Now I am using VS code and I don't want to create any Visual Studio Solution. I don't know how to setup a continuous deployment in VSTS with just the pure Angular code.

I know I probably need to use IIS anyway and I need some settings/configs. But I just don't want to do them in Visual Studio project.

解决方案

Using node.js to create a deploy package and then deploying the package by "Azure Web App Deployment" task is a convenient way to deploy to Azure Site.

However, if you don't like this, you can create a batch/power-shell script to copy your deployment files in Azure Web App via FTP method. Refer to this link for details: Deploy by copying files to Azure manually

And you can also try to deploy it from Source Control directly: Deploy from a cloud-based source control service

这篇关于如何将纯Angular应用程序从Visual Studio Team System部署到Azure网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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