Is there a way to change the config parameters in nano after initialization? I’d like to init nano with:
nano = require('nano')('http://127.0.0.1:5984')
and later change user and password, after a user submits the login form. I always get an error:
nano.cfg.user = params.user.name
TypeError: Cannot set property 'user' of undefined
Or should I fork nano and write an auth function to adjust the values?
The authentication can be send as part of the http header:
The username and password can be set with a ‘auth’-function: