Azure App Service 突然提供文件目录概览而不是 Angular App

编程入门 行业动态 更新时间:2024-10-28 11:22:22
本文介绍了Azure App Service 突然提供文件目录概览而不是 Angular App的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个运行 Angular 应用程序的 Azure Web 应用程序 (WebAppLinux).部署基于 Azure 管道中的 Azure WebApp@1 任务.

I have an Azure Web App (WebAppLinux) running an Angular application. The deployment is based on the Azure WebApp@1 task in an Azure pipeline.

直到今天一切都很好.在没有任何人进行部署的情况下,该网站仅显示一个索引页面,其中包含存储在主目录中的文件.

Everything was fine until today. Without anyone having done a deployment, the website only shows an index page with the files stored in the home directory.

通过 CI/CD 管道重新部署仍然成功.但是,错误仍然存​​在.

A re-deployment through the CI/CD pipeline is still successful. However, the error remains.

Azure 应用服务是否有任何更改导致我的应用程序不兼容?

Was there any change to the Azure App Service that made my application incompatible?

推荐答案

stackoverflow/中LuisDev99的答案a/61707805/3809334 已经解决了问题.

我们必须添加

pm2 serve/home/site/wwwroot --no-daemon --spa

到配置下的启动命令,选择选项卡->常规设置

to the Startup Command under Configuration, select the tab -> General Settings

过去,我们在 Angular 应用程序中有一个名为 npx serve -s 的启动脚本.

In the past we had a startup script that called npx serve -s within our Angular application.

似乎这种方式在周末不再奏效了.可能是因为 Microsoft 在 WebApp 中进行了配置更改

It seems that this way did not work anymore over the weekend. Maybe because there was a configuration change in the WebApp by Microsoft

更多推荐

Azure App Service 突然提供文件目录概览而不是 Angular App

本文发布于:2023-08-02 11:53:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1277590.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:而不是   文件   目录   App   Azure

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!