1

I am trying to build a azure pipeline for a nodejs project. While deploying the application via release pipeline to azure web app, if I use "npx serve -s" it is working but if I use "npm run start"/"node server.js"/"ng serve" it is not working. Can someone explain what is the issue?

Levi Lu-MSFT
  • 18,505
  • 1
  • 12
  • 19
Aravinda
  • 11
  • 4

1 Answers1

0

I think when you start with your project, it will like run something like below in pipline.

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

   StartupCommand: 'npx serve -s'

For more details, you can see this post.

Jason Pan
  • 5,844
  • 1
  • 7
  • 12