My app.yaml file is -
runtime: node runtimeVersion: 8 application: demo-chekin-test env: - name: NODE_ENV value: production - name: ListofUsers valueRef: name: QR-User-Map key: userList
I want to fetch the value of ListOfUsers in my js file. How can I refer to the environment variable from the app.yaml file into my js file?
Solved! Go to Solution.
Hi Harpreet,
You should be able to reference the variable via env vars. For instance, to get the value of "NODE_ENV" you would do something like:
var nodeEnv = process.env.NODE_ENV
Hi Harpreet,
You should be able to reference the variable via env vars. For instance, to get the value of "NODE_ENV" you would do something like:
var nodeEnv = process.env.NODE_ENV
Thanks Kyle! It works for me.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |