在Azure Web App上部署的Angular dist/向我显示默认屏幕 [英] Deployed Angular dist/ on Azure Web App showing me default screen
问题描述
我已使用经典编辑器在Azure DevOps上安装了CI-CD.我确实设法通过Build Pipeline构建了angular,并使用Release管道将Angular/dist文件夹推送到了Web应用程序.
I have setup CI-CD on Azure DevOps using classical editor .I did managed to Build angular by Build Pipeline and Using Release pipelines I have pushed the Angular /dist folder to the web app.
内容如下:
/home/site/wwwroot/my-angular-app/
但是,每当我打开Web应用程序的URL时,我只能看到Azure Web应用程序的默认网页.我已经在Web App(Linux)上进行了部署,并且选择了Node作为运行时任务.
But whenever I open url for the web-app I only could see default web-page of azure web app. I have deployed on Web App (Linux) and I have choose Node as runtime task.
当我刚接触Azure时,还有什么需要做的吗?
As I'm new to Azure Is there anything else needs to done ?
谢谢.
推荐答案
在Azure Web App上部署的Angular dist/向我显示默认屏幕
Deployed Angular dist/ on Azure Web App showing me default screen
访问https://{appservice_name} .azurewebsites.net时,需要做两件事才能显示Angular Web App页面.
There are two things you need to do to make the Angular Web App page show when access to https://{appservice_name}.azurewebsites.net.
- 将Angular/dist文件夹部署到Azure Web应用程序时,请不要包括my-angular-app文件夹.只是让dist的内容
/home/site/wwwroot
路径下的文件夹 - 为您的
App Service
>常规设置
添加npx serve -s
作为启动命令:
- When deploy the Angular /dist folder to azure web app, please don’t
include the my-angular-app folder. Just let the content of dist
folder under the path
/home/site/wwwroot
- Add
npx serve -s
as Startup Command for yourApp Service
>General settings
:
希望这会有所帮助.
这篇关于在Azure Web App上部署的Angular dist/向我显示默认屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!