Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to make server environment variables available to browser on frontend in node js

# in the project's root dir create a file named: ".env" and 
# insert the env variables as follows.
# NB: the env variable name must start with REACT_APP for react js projects
REACT_APP_CLIENT_ID=jfjffffaddfeettgydgdffv
REACT_APP_KEY=aaddddawrfffvvvvssaa
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #server #environment #variables #browser #frontend #node #js
ADD COMMENT
Topic
Name
9+7 =