We recently received some feedback regarding to Windows Azure App Service Node version change, so I would like to write this article to clarify what happened and what is the best practice.
What is the discussion scope of this article?
What happened?
Is that removement is expected behavior?
What is the best practice?
https://$YourAppServiceName.scm.azurewebsites.net/api/diagnostics/runtime
2. Please do not hard code the Node minor version. As a bad example:
You should use the settings like this:
Set app setting WEBSITE_NODE_DEFAULT_VERSION=~14
If the website need some specified settings in the configure file. e.g. there is a subfolder under this website may need specified node version, you can set the NodePath like that:
In the config NodePath=C:\program file\nodejs\%WEBSITE_NODE_DEFAULT_VERSION%\node.exe
3. If the website application only works well in some specified NodeJS version, e.g. 14.15.1. Firstly, it is not the best practice, we should make sure the application can work well in the recent latest version. Because the later version will include some benefits, e.g. more security, fix bug on previous version. If there is some hard limitation with the application, and there is no easy way to make it work on the recent latest version, you can considering uploading your own NodeJS under the /home/site directory. Then you can configure your website to use this as the Node path. And the platform upgrade will not influence this App Service Node Version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.