当我们使用ng serve或npm运行启动时,Azure管道出现故障。

问题描述 投票:1回答:1

我正试图为一个nodejs项目构建一个azure管道。当我通过发布管道将应用程序部署到 azure Web 应用程序时,如果我使用 "npx serve -s "就可以工作,但如果我使用 "npm run start""node server.js""ng serve "就不能工作。谁能解释一下问题出在哪里?

node.js azure npm azure-web-sites continuous-deployment
1个回答
0
投票

我想当你开始使用你的项目时,它会在pipline中运行类似下面的东西。

- task: AzureRmWebAppDeployment@4
  displayName: deploy
  inputs: 
   azureSubscription: 'yoursubscription'
   appType: webAppLinux
   webappName: 'angularproj'
   deployToSlotOrASE: true
   ResourceGroupName: mygroup
   packageForLinux: dist/myangularapp

   StartupCommand: 'npx serve -s'

更多细节,你可以看 此职位.

© www.soinside.com 2019 - 2024. All rights reserved.