Closed bingomanatee closed 13 years ago
You just add a url parameter to the constructor, e.g.:
new Mongolian("mongo://foo.com:12345")
There should be an example on the readme under the "Connections and Authentication" section. Do you think it could be clearer?
new Mongolian("mongo://foo.com:12345")
results in database name be string 'undefined'
. couldn't you make it default to, say, 'test'
? TIA, --Vladimir
scary. If you don't define something, it should be undefined. Though not the STRING "undefined". thats even scarier. I want it to fail.
new Mongolian("mongo://foo.com:12345")
should not result in any database object at all. It should result in a server connection. From there you would call the db method to get a database instance. Defaulting to 'test' is extremely error-prone.
How are you determining the name is undefined?
How do you connect to a database on a different host, port, etc.?