A short sample Program to show how to connect to MongoDB and Redis
-
MONGODB_URLThe MongoDB URL with user name and passwordexport MONGODB_URL='mongodb://<user>:<password>@<ip>:<port>'
-
REDIS_URLThe 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_base64of the Service Credentials -
REDIS_CA_BASE64Certificate 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.composedof the Service Credentials
-
CLOUDANT_URLThe Cloudant URLIn the IBM Cloud the value can be retrieved from the value
urlof the Service Credentials -
CLOUDANT_APIKEYAn Api key to access the Cloudant dbIn the IBM Cloud the value can be retrieved from the value
apikeyof the Service Credentials
npm i
node index.js