I am a programmer but I hate grammar. Here you will find what I did, doing , will do ... Scattered pieces of knowledge that I have deleted from my mind to the trash bin through out my boring daily coding life. I will also report some of my failures in life so dear to me not success, because I have always learnt much only when I fail.
Thursday, April 28, 2016
Tuesday, April 26, 2016
Monday, April 18, 2016
Thursday, April 14, 2016
Friday, April 8, 2016
Wednesday, April 6, 2016
trying to open unclosed connection
When having the error, the first thing to do is to restarting your mongo database.
If the error still persist, chances are that your connection statement is as below:
var dbUrl= 'mongodb://localhost:27017/test';
mongoose.connect(dbUrl);
To solve it , change connect to createConnection
var dbUrl= 'mongodb://localhost:27017/test';
mongoose.createConnection(dbUrl);
It should be working now, if not drop me a comment and will come to your rescue...
If the error still persist, chances are that your connection statement is as below:
var dbUrl= 'mongodb://localhost:27017/test';
mongoose.connect(dbUrl);
To solve it , change connect to createConnection
var dbUrl= 'mongodb://localhost:27017/test';
mongoose.createConnection(dbUrl);
It should be working now, if not drop me a comment and will come to your rescue...
Subscribe to:
Posts (Atom)