Wednesday, 3 May 2017

connect mongoDb to nodejs on localhost

I'm trying to use mongoDB for my app I have 2 databases and use next code to connect: code to connect and use db

if I use this db

var mongo_db = mongojs("mongodb://Andrew:Andrew@ds127391.mlab.com:27391/cat_mean_db", ["tasks"]);

everything is working well, but when I try to use db on localhost I got an exeption: connection 0 to localhost:3000 closed

the local db is exist and has user for shure:db exist

so, please help with my trouble



via Andrew Malyar

No comments:

Post a Comment