Azure App Service (Windows) Config Variable


I'm having an issue reading env variables on Azure App Service Windows instance. I use dotenv nodejs package for storing my env variables in .env file. It works perfectly fine on my local machine (Windows 10), but the same does not when hosted on a Windows App service. I tried some troubleshooting by printing out the env variables at run time and I get blank output for the same. Somehow it's not able to read the variables in the .env file.


I also ensured that the .env file and the entries are intact on the deployed host by logging onto the console in the portal.


What am I doing wrong?

2 Replies

@eynarain Did you try setting the environment variables using the Configuration settings for your webapp?

Check out this screenshot, I guess this should help you setting your environment variables.


You may find more info on this at:
I hope this solves your problem.




@akhilvattsThat did the trick. Thanks for letting me know of this.