For the Azure Framework to run node, there must be a web.config file in the root folder configuring IIS to run the node process.
If you deploy via git, you don't have to worry about creating a web.config file. The Azure framework will perform a post deployment build action, which will
- recognize your code as a node application and create a web.config file for you.
- Run
npm install
to ensure that the required packages are present.
By default, the post deployment build action will NOT run for .zip deployments. You can solve this via one of the following two options:
- Override the default setting so the build action does run OR
- Include the
web.config file
and the node_modules
folder in the zip file.
To override the default behavior and enable the build actions for zip deployments, simply add the application setting SCM_DO_BUILD_DURING_DEPLOYMENT, set to true
If you want to enable node using your own web.config
file, see this answer for a sample web.config file. Also, see this blog: https://blogs.msdn.microsoft.com/silverlining/2012/06/14/windows-azure-websites-node-js/ for more detail.