Azure ADO Build +部署到azure Web应用程序仍显示“欢迎节点开发人员”页面

时间:2020-05-25 16:41:38

标签: angular azure azure-devops azure-web-app-service

在ADO中创建将代码部署到Azure Web App的版本时遇到问题。我可以登录到azure,然后看到文件已复制到/site/wwwroot/文件夹中,但是仍然看到默认的“嘿,Node开发人员!”页。

对于构建和部署的应用程序来说,值得一提的是一个有角度的8应用程序。复制到wwwroot文件夹的文件如下

enter image description here

发布步骤

enter image description here

我不确定这里到底出了什么问题。我也尝试从VS Code进行部署,但结果相同。

1 个答案:

答案 0 :(得分:1)

如果hostingstart位于默认文档部分中您自己的欢迎页面上方,并且您的名称看起来像是index.html,则可能会发生这种情况,因此该主机名应为hostingstart.html。请参阅附件图片。

enter image description here

编辑: 由于缺少默认文档,因此这似乎是Linux应用程序服务。要在Linux上解决此问题,您应该按照https://docs.microsoft.com/nb-no/archive/blogs/waws/things-you-should-know-web-apps-and-linux#set-your-default-document-in-a-nodejs-app-using-javascriptapplies-to-azure-app-service-on-linuxapplies-to-web-app-for-containers

的说明上载index.js

var express = require('express'); var server = express(); var options = { index: 'index.html' }; server.use('/', express.static('/home/site/wwwroot', options)); server.listen(process.env.PORT);

相关问题