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

using cloudant for storage #19

Closed
shripadk opened this issue Sep 26, 2010 · 4 comments
Closed

using cloudant for storage #19

shripadk opened this issue Sep 26, 2010 · 4 comments

Comments

@shripadk
Copy link

i am using cloudant for storage. missing feature: https requests using httpClient in node-couchdb?

i would want to do something on the lines of :

var express   = require('express'),
    couchdb   = require('couchdb');

var app    = express.createServer(),
    couch  = couchdb.createClient(443, "username.cloudant.com", "username", "password");

var db  = couch.db('database');
app.get('/', function(req, res) {
        db.getDoc('doc', function(err, doc) {
            res.send(doc);
        })
});

app.listen(3000);
@langalex
Copy link
Contributor

since this commit as soon as you set the port to 443 ssl will be used automatically

@shripadk
Copy link
Author

Does not seem to work for me:

node.js:63
throw e;
^
Error: ECONNRESET, Connection reset by peer
at Client._readImpl (net:304:14)
at IOWatcher.callback (net:454:24)
at node.js:769:9

@felixge
Copy link
Owner

felixge commented Nov 12, 2010

Sorry to let you know, but I have decided to no longer maintain this module. The main reason is that I currently don't have any active project involving couchdb whatsoever, so maintaining this module has become an unmanageable burden. That being said, if somebody is interested in becoming the maintainer, let me know.

@ammmir
Copy link

ammmir commented Feb 1, 2011

Line 112 needs to pass true for the third argument to create an SSL connection:

   var
-    httpClient = http.createClient(port, host),
+    httpClient = http.createClient(port, host, port == 443),
     couchClient = new Client();

The changesStream() function already does this.

This issue was closed.
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

No branches or pull requests

4 participants