- If you have not already added the value for the my/config/value key to Consul, let's add it by running curl -X PUT -d 'From Consul Config' http://localhost:8500/v1/kv/bookpub/my/config/value.
- The first step is to make sure envconsul can connect to the Consul server and that it extracts the correct data based on our configuration key. Let's execute a simple test by running the envconsul --once --sanitize --upcase --prefix bookpub env command. We should see the following in the output:
...
TERM=xterm-256color
SHELL=/bin/bash
LANG=en_US.UTF-8
HOME=/Users/<your_user_name>
...
MY_CONFIG_VALUE=From Consul Config
- After we have verified that envconsul is returning the correct data to us, we will use it to launch our BookPub