I’m working on the URL shortener problem and I think I’m having trouble getting MongoDB to work, which is weird as I took all the code from a previous problem and I’m not getting errors in the log.
The following query causes my program to hang up and time out:
Url.find({},function(err, data) {
console.log(“first”);
if (err)
res.send(err);
console.log(“number of data” + data.length);
res.json(data); })
}
Url.find is causing the hangup. It makes me question whether the DB is connected, but there are no errors.
Any pointers where to start? Much appreciated!