Environment specific configuration for Adobe IO runtime project

Avatar

Avatar
Give Back
Level 1
Sharma_Shruti
Level 1

Like

1 like

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile

Avatar
Give Back
Level 1
Sharma_Shruti
Level 1

Like

1 like

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Give Back
Boost 1
View profile
Sharma_Shruti
Level 1

13-05-2020

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 

https://www.adobe.io/apis/experienceplatform/runtime/docs.html#!adobedocs/adobeio-runtime/master/get...

Steps:

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 . 

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Ignite 1
Level 2
sarahxxu
Level 2

Likes

5 likes

Total Posts

11 posts

Correct reply

2 solutions
Top badges earned
Ignite 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Ignite 1
Level 2
sarahxxu
Level 2

Likes

5 likes

Total Posts

11 posts

Correct reply

2 solutions
Top badges earned
Ignite 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
sarahxxu
Level 2

15-05-2020

Hi @Sharma_Shruti 

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.

Sarah

Avatar

Avatar
Ignite 5
Employee
Mihai_Corlan
Employee

Likes

6 likes

Total Posts

29 posts

Correct reply

4 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Establish
Give Back
View profile

Avatar
Ignite 5
Employee
Mihai_Corlan
Employee

Likes

6 likes

Total Posts

29 posts

Correct reply

4 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Establish
Give Back
View profile
Mihai_Corlan
Employee

18-05-2020

On issue #1 Sarah Xu already answered. On issue #2, can you give us more details about what you are trying to do?