I was given a task to deploy a nodejs app to azure web app however I can't get it to work.
I followed the instructions from this link and everything seems to pretty straightforward.
The only difference is my package.json start script looks like the one below.
"scripts": {
"start": "node ./node_modules/@samplescope/samplefolder/sample_service.js"
},
In the sample source code from the instructions link, it has a web.config which points to server.js, so I modified that part to the location of my start up file which is "./node_modules/@samplescope/samplefolder/sample_service.js"
from this
<rule name="DynamicContent">
<match url="/*" />
<action type="Rewrite" url="server.js"/>
</rule>
to something like this
<rule name="DynamicContent">
<match url="/*" />
<action type="Rewrite" url="./node_modules/@samplescope/samplefolder/sample_service.js"/>
</rule>
I also tried to remove the web.config I created because according to this link kudu will try to generate one for you base on your package.json but still it didn't work.
I know I am doing something wrong, can someone point me in the right direction.
Also, how does "npm install" gets invoked in the azure web app?
Yes, it working locally when invoked by "npm start"