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 196 times
1
![](../../users/profiles/11882186.webp)
Levi Lu-MSFT
- 18,505
- 1
- 12
- 19
![](../../users/profiles/12913130.webp)
Aravinda
- 11
- 4
-
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
-
@Jason, Thank you – Aravinda Jun 09 '20 at 11:18
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.
![](../../users/profiles/7687666.webp)
Jason Pan
- 5,844
- 1
- 7
- 12