Closed AussieFlem closed 11 years ago
You are definitely not doing anything stupid. I'll work on making it support authenticated connections.
Great - otherwise it's working well for me (I think!)
@AussieFlem sorry, but I'm not finding the time to support auth at the moment. If you find the time, I would be more than happy to accept a pull request; just make sure it's tested.
Note to self: root cause is how the DB connection is being made. Should call mongodb.MongoClient.connect(uriString, cb) rather than instantiating a Db myself. That gets users to work.
This should be fixed later this week.
Documentation re: MongoClient: http://mongodb.github.com/node-mongodb-native/driver-articles/mongoclient.html
Fixed in 0.1.2
I'm just looking at the example code, and it works fine, but only if I've got the server running without auth=true.
Is it possible to test against a server running with authentication on?
I tried setting the URL to mongodb://theUsername:thePassword@localhost/demo-app-clearing-db'
but Mocha threw errors:
Error: done() invoked with non-Error: unauthorized db:demo-app-clearing-db ns:demo-app-clearing-db.system.namespaces lock type:1 client:127.0.0.1
Am I doing something stupid or does it only work without the DB needing authentication?
Cheers :)