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

编程入门 行业动态 更新时间:2024-10-28 07:30:36
本文介绍了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?

推荐答案

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

发布评论

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

>www.elefans.com

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