2
votes

I'm using ExpressJS to connect the dots between NodeJS and my Angular app. I wanted to install this npm package norobot: to leverage the process object.

I'd like to know where/how to set the NODE_ENV in an App Service within Microsoft Azure.

I was pointed here, https://docs.microsoft.com/en-us/azure/app-service/web-sites-configure#howtochangeconfig

But the current-day Azure portal looks significantly different versus what the documentation has supplied, leading me to a big disconnect.

If you could point me in the right direction, that'd be appreciated.

Additional FYI, At run-time, my stack is running on Node.js 9.4.

1

1 Answers

1
votes

I wanted to install this npm package norobot: to leverage the process object.

norobot package has absolutely nothing to do with process.

But the current-day Azure portal looks significantly different versus what the documentation has supplied, leading me to a big disconnect.

Looks really shouldn't matter (to an extent), they serve as a visual guide.

The key section of the guide/docs you posted is App Settings:

This section contains name/value pairs that your web app will load on start up.

  • PHP, Python, Java and Node applications can access these settings as environment variables at runtime. For each app setting, two environment variables are created; one with the name specified by the app setting entry, and another with a prefix of APPSETTING_. Both contain the same value.

So following a similar answer: https://stackoverflow.com/a/34622196/2382650

set: NODE_ENV: some_value as shown above and it will be availble in your Express app as process.env.NODE_ENV