Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for a path in host #284

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

pietervandereems
Copy link

Based on #128
We use this because our couchdb is behind a proxy.

@pietervandereems
Copy link
Author

This is needed for the changesfeed:

diff --git a/lib/cradle/database/changes.js b/lib/cradle/database/changes.js
index fe0ba8f..b8bcd7a 100644
--- a/lib/cradle/database/changes.js
+++ b/lib/cradle/database/changes.js
@@ -35,7 +35,7 @@ Database.prototype.changes = function (options, callback) {
             auth = this.connection.auth.username + ':' + this.connection.auth.password + '@';            
         }
         
-        options.db = protocol + '://' + auth + this.connection.host + ':' + this.connection.port + '/' + this.name;
+        options.db = protocol + '://' + auth + this.connection.host + ':' + this.connection.port + (this.connection.path_prefix || '') + '/' + this.name;
     }
         
     feed = new follow.Feed(options);

@panuhorsmalahti
Copy link
Contributor

  1. Fix conflicts
  2. Add test for the new feature
  3. Add documentation for the new feature (basically a sentence or two in the readme)
  4. Remove all the extra stuff from the PR (like the package.json changes and stuff), as it seems you've updated the PR when you only wanted to make those changes to your own fork
  5. Rename path_prefix to pathPrefix

With these changes I'm okay for merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants