Requirement : We need to create and read environment specific configurations on Adobe IO project i.e WCS Commerce API urls and different namespace based on different environment(Dev, Prod)
We followed steps provided in document
1- Created .env file in workspace.
2- Provided AIO_RUNTIME_APIHOST , AIO_RUNTIME_AUTH and AIO_RUNTIME_NAMESPACE
3- Deployed code base .
Issue 1: Unable to pick credentials provided in .env file.
Issue 2: How to read environment specific variables in node.js code base .
Are you configuring the wsk cli or the aio cli?
The .env file only applies if you are configuring the Adobe I/O CLI. After you create the `.env` file within the current working directory, update it with your Runtime credential and save the file. When you are in this directory, and type in `aio runtime property get`, all the values should be automatically picked up and shown here. You can proceed to execute any `aio runtime` commands, including deployment commands.
Alternatively, if you already have a `.wskprops` file in your root directory, the Adobe I/O CLI picks that up automatically as well.
Hope this helps.
On issue #1 Sarah Xu already answered. On issue #2, can you give us more details about what you are trying to do?