IISNODE with NUXT environment variables not working in production

376 Views Asked by At

I'm running a NUXT JS app in a windows server with iisnode. I was able to make it work, however I can't figure out a small issue that I'm having with environment variables.

In my web.config file I'm setting the node_env variable in the <iisnode node_env="development" /> tag, and all other environment variables I'm putting it in the appsettings section like so

<appSettings>
  <add key="axios_url" value="https://myapi.domain.com/" />
  <add key="npm_package_name" value="NUXTJS APP" />
</appSettings>

When I have the node_env variable set to "development" the other vars (the ones in appsettings) works fine, however when I set the node_env variable to production then I'm unable to read the other vars..

Why is this happening?

0

There are 0 best solutions below