简体   繁体   English

将 ReactJS Web 应用程序部署到 IIS

[英]Webdeploy a ReactJS web application to IIS

We have developed a ReactJS web application and we want to host this application on IIS.我们已经开发了一个 ReactJS Web 应用程序,我们希望在 IIS 上托管这个应用程序。 The application successfully runs on IIS.应用程序在 IIS 上成功运行。 Now, it is time to upgrade the application.现在,是时候升级应用程序了。 Instead of manually copying the files to IIS folder, we want to simplify the deployment process.我们希望简化部署过程,而不是手动将文件复制到 IIS 文件夹。

How can we deploy the build package that is generated using command npm run build onto IIS web site using WebDeploy protocol?我们如何使用 WebDeploy 协议将使用命令npm run build生成的构建包部署到 IIS 网站上?

(Note: IIS has already been configured to accept and successfully executes WebDeploy requests, such as Visual Studio MVC project outputs.) (注意:IIS 已配置为接受并成功执行 WebDeploy 请求,例如 Visual Studio MVC 项目输出。)

It may be difficult to implement it, because web deploy often requires visual studio to package the application, which is different from the direct build of reactJS.实现起来可能比较困难,因为web部署往往需要visual studio来打包应用,这与reactJS的直接构建不同。

More deployment of ReactJS is to copy to remote IIS after the build is completed.If you insist on using web deploy, first you need to combine it with visual studio, packing the ReactJS after building.Then use powershell to deploy the package onto the remote server . ReactJS的更多部署是构建完成后复制到远程IIS。如果你坚持使用web部署,首先需要结合visual studio,构建完成后打包ReactJS。然后使用powershell将包部署到远程服务器 在此处输入图片说明

My preferred method is to use Azure DevOps .我的首选方法是使用Azure DevOps It is simple and easy to use, especially for the subsequent upgrade and deployment needs of your application.简单易用,特别适合您应用的后续升级和部署需求。 It can be deployed remotely, and it is also very convenient to upgrade and iterate after deployment.可以远程部署,部署后升级迭代也很方便。

Azure PipelinesAzure 管道

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

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