VCAP_SERVICES for local CouchDB

I have a NodeRED application on Bluemix using Cloudant. All well and good.
I tried to run it local after setting the VCAP_SERVICES environment variable. All well and good.

Now I want to change to a local couchDB (Port 5984) but I fail to find the right set of entries for the VCAP_SERVICES environment variable to point to local.

My goal: without touching the flows switch between the databases bases on the env variable.
Can someone enlighten me?

local couch has no username/password

Not so much a Node-RED question as it is an IBM Cloud/Cloud Foundry/VCAP_SERVICES question.

In your VCAP_SERVICES value you'll have a cloudantNoSQLDB array of bound services. If you have more than one instance in that array, hopefully you can identify which is the one you want to point to local. Within that instance will be a credentials object. You should be able to set some combination of host, port , url, username, password to get it to connect locally. If there are lots of iam_* type properties, you'll want to remove them.

Hi Nick,

thx for chipping in.

I tried a lot of permutations, quite frustrating. My conclusion: I suspect I do have to create a local user, since empty username/password or no username/password didn't work. At the end I resorted to use an environment variable to store the URL. Works online and local.

If I find an spare hour, I'll try with a locked down database and report back

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.