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?
Asked
Active
Viewed 591 times
1

Levi Lu-MSFT
- 27,483
- 2
- 31
- 43

Aravinda
- 11
- 6
-
could you share the logs? – Shayki Abramczyk Jun 03 '20 at 13:41
-
https://stackoverflow.com/questions/50605219/difference-between-npx-and-npm – Jason Pan Jun 08 '20 at 06:27
1 Answers
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
- 15,263
- 1
- 14
- 29