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

查看:86
本文介绍了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 App Service是否进行了任何更改,使我的应用程序不兼容?

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天全站免登陆