Here's what I have:
var express = require('express');
var MongoClient = require('mongodb').MongoClient;
var Server = require('mongodb').Server;
var app = express();
var client = new MongoClient(new Server('localhost', 27017, {}), {});
client.open(function(err, client){
//callback
});
And when I run it, it points to the line the open method is on and says "undefined is not a function". What am I doing wrong?
client.connect()instead ofclient.open()?