Azure App Service 突然提供文件目录概览而不是 Angular App [英] Azure App Service suddenly delivers file directory overview instead of Angular App

查看:16
本文介绍了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?

推荐答案

https://stackoverflow.com/中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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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