Process Enviroment
Using Enviroment In config.yaml
By using symConfigKey in the config.yaml file as follows, it can be used parametrically for environments.
Retrieves values for different environments from process.env using ${ }. Then, when symConfigKey is called in the function, the given url information is retrieved.
The value can be accessed by using it in 2 different ways.
- In the example above, sampleUrl information is defined in the enviroment, these definitions are given by the devops side.
Test In The Local Environment
To test in the local environment, a definition is made in the terminal as follows:
Use export sampleUrl='https://api.restful-api.dev/objects/7' command to define sampleUrl.
Check the value added with the command node --print 'process.env'. This value is then used in config.yaml.
Then this value can be used in 2 different ways in config.yaml as follows.