I am using a Redis DB to use an Express-Gateway on Heroku.
I would like to know how to set Redis credentials as a unique URL-param, instead of using
separated vars.
Right now, Express Gateway reads credentials from the file system.config.yml
, where credentials structure is
# Core
db:
redis:
host: [host]
port: [port]
namespace: [namespace]
password: [password]
Unfortunately, Redis on Heroku automatically sets credentials as a .ENV var, in the form of URL:
REDIS_URL = "redis://h:[psw]@[host]:[port]"
How can I make Express-Gateway reads credentials from .ENV instead of system.config.yml
? Or, how can I make system.config.yml
reads from .ENV the whole URL?
Even worst, credentials are not permanent, and are changed periodically without alert.
So, how can I make Express-Gateway connect to Redis on Heroku?
Thank you
2
Answers
I solved in this way: splitting the Vars before starting the gateway, and set the Env vars.
and
Express Gateway’s configuration files support environment variables — check that out and you should be good to go!