简体   繁体   English

如何将纯Angular应用程序从Visual Studio Team System部署到Azure网站

[英]How to deploy a pure Angular application from Visual Studio Team System to Azure websites

Does anyone know how to deploy a pure Angular application to Azure websites? 有谁知道如何将纯Angular应用程序部署到Azure网站?

I have a Angular 2 application (like the Angular 2 Quick Start) in VSTS Git source control. 我在VSTS Git源代码管理中有一个Angular 2应用程序(如Angular 2快速入门)。 How can I deploy the application to Azure websites from setting up the VSTS build? 如何通过设置VSTS版本将应用程序部署到Azure网站?

I saw document for deploying node.js (with angular) to Azure: https://msdn.microsoft.com/en-us/library/vs/alm/build/azure/nodejs . 我看到了将node.js(带角度的)部署到Azure的文档: 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. 我确实按照文档中的说明成功地将许多有角度的应用程序部署到Azure网站。 But I don't use anything with node.js in my Angular application. 但是我在Angular应用程序中对node.js不使用任何东西。 I hope that I can just deploy my pure Angular application to azure websites. 我希望我可以将纯Angular应用程序部署到Azure网站。

Previously, I used Visual Studio to create empty project to contain my Angular application. 以前,我使用Visual Studio创建一个空项目来包含我的Angular应用程序。 These kind of projects can be easily deployed to Azure websites. 这些项目可以轻松部署到Azure网站。 Now I am using VS code and I don't want to create any Visual Studio Solution. 现在,我正在使用VS代码,并且不想创建任何Visual Studio解决方案。 I don't know how to setup a continuous deployment in VSTS with just the pure Angular code. 我不知道如何仅使用纯Angular代码在VSTS中设置连续部署。

I know I probably need to use IIS anyway and I need some settings/configs. 我知道我可能仍然需要使用IIS,并且需要一些设置/配置。 But I just don't want to do them in Visual Studio project. 但是我只是不想在Visual Studio项目中进行操作。

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. 使用node.js创建部署程序包,然后通过“ Azure Web App部署”任务部署程序包是一种便捷的方法,可以将其部署到Azure站点。

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. 但是,如果您不喜欢这样做,则可以创建批处理/ power-shell脚本,以通过FTP方法在Azure Web App中复制部署文件。 Refer to this link for details: Deploy by copying files to Azure manually 请参考此链接以获取详细信息: 通过手动将文件复制到Azure进行部署

And you can also try to deploy it from Source Control directly: Deploy from a cloud-based source control service 您还可以尝试直接从Source Control进行部署: 从基于云的 Source Control 服务进行部署

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM