Reputation: 3152
NodeJS applications on Azure portal are running by default in production
environment (process.env.NODE_ENV
is production).
Is it possible to change the environment to development
? And how?
(If it matters, I configured the application as a Web Site
on Azure.)
Upvotes: 7
Views: 8983
Reputation: 5019
You can set the NODE_ENV variable under the Website App settings configuration on the portal: http://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/#howtochangeconfig
Additionally, if you are using the Azure CLI (which you can install via npm install azure-cli -g
), you can run the following azure site config add NODE_ENV=development
assuming your CLI is configured.
This will ask you for the website name then set the config.
Upvotes: 14