DEV Community

Discussion on: Various ways of handling environment variables in React and Node.js

Collapse
 
monicaadikesavan profile image
MonicaAdikesavan

Hi,
Great Post !
But how to get environement values from Azure App Service, Say we are using Linux machine and how to access the appsetting values from ReactJS?
The process.env.APPSETTING_Variable returns values when we try that in the apps service shell, but the same isnt returning values in the app once deployed.

could you post a solution on this?

Collapse
 
myogeshchavan97 profile image
Yogesh Chavan

@monicaadikesavan sorry but I never worked with Azure App service so can't help you with that

Collapse
 
monicaadikesavan profile image
MonicaAdikesavan

Thanks, But how can we handle deployment variables without .env file in ReactJS, Can you help on that ?

Thread Thread
 
myogeshchavan97 profile image
Yogesh Chavan

@monicaadikesavan Every hosting provider provides a way to add environment variables from UI as I have shown in the screenshot at the end of this article, you can add environment variables from build & deploy section.