Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- node.js:134
- throw e; // process.nextTick error, or 'error' event on first tick
- ^
- TypeError: undefined is not a function
- at CALL_NON_FUNCTION_AS_CONSTRUCTOR (native)
- at Object.<anonymous> (/nodetest/node-mongo/index.js:8:13)
- at Module._compile (module.js:404:26)
- at Object..js (module.js:410:10)
- at Module.load (module.js:336:31)
- at Function._load (module.js:297:12)
- at Array.<anonymous> (module.js:423:10)
- at EventEmitter._tickCallback (node.js:126:26)
- //CODE
- var mongodb = require('mongodb/lib/mongodb');
- var mongo = new mongodb.MongoDB();
- mongo.addListener('close', function(){
- sys.puts('Closing Connection');
- });
- mongo.connect({
- hostname: 'dbh10.mongolab.com',
- port: 27107,
- db: 'alohadataset',
- username: 'user',
- password: 'pass'
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement