Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Is remote connection possible? #35

Closed
AJB99 opened this Issue · 2 comments

2 participants

AJB99 Mark Nadal
AJB99

Hi there,

I'm new to Node and Mongo and mongous looks like exactly what I'd like to operate on my DB, except I can't figure out how to connect to it.

I'm hosting my DB with MongoHQ, how would I go about connecting to is using Mongous?

I've tried the following but it didn't work:

var $ = require("mongous").Mongous;
$().open("myhost.mongohq.com","12345").auth("myUserName","myPassword", function(reply){
    console.log("Connected to MongoHQ!");
});

Is this possible using Mongous?

Thanks!

Mark Nadal
Owner

Hey, sorry it took me so long to reply - I was gone at a hackathon in SF.

You are very close! We definitely need to improve the remote connection code to make it easier (and to support connection URIs, which we currently don't). Here is the code that I have used in the past to connect to mongoHQ...

$("$cmd").open("myhost.mongohq.com", 12345);
$("$cmd").auth("myUserName", "myPassword", function(reply){
    console.log("Connected to MongoHQ!");
});

It is a little ugly, but it should work! Please let me know if this helped.

AJB99

No worries at all amark, thanks for taking the time to answer. It's not ugly at all. Makes sense now that I see it written out. I'll give this a go. Thanks again for the great software!

AJB99 AJB99 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.