A short sample Program to show how to connect to MongoDB and Redis
-
MONGODB_URL
The MongoDB URL with user name and passwordexport MONGODB_URL='mongodb://<user>:<password>@<ip>:<port>'
-
REDIS_URL
The Redis URL with user name, password and dbexport REDIS_URL='rediss://<user>:<password>@<hostname>:<port>/<DB>'
In the IBM Cloud the value can be retrieved from the value
connection.rediss.certificate.certificate_base64
of the Service Credentials -
REDIS_CA_BASE64
Certificate authority for self signed certificateexport REDIS_CA_BASE64=<Base 64 encode ca>
In the IBM Cloud the value can be retrieved from the value
connection.rediss.composed
of the Service Credentials
-
CLOUDANT_URL
The Cloudant URLIn the IBM Cloud the value can be retrieved from the value
url
of the Service Credentials -
CLOUDANT_APIKEY
An Api key to access the Cloudant dbIn the IBM Cloud the value can be retrieved from the value
apikey
of the Service Credentials
npm i
node index.js