This is the typical way I create MySQL connection in node.js
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : '',
database : 'address_book'
});
var app = express();
connection.connect(function(err){
if(!err) {
console.log("Database is connected ... nn");
} else {
console.log("Error connecting database ... nn");
}
});
Is it good enough for production use? When should one use connection pooling? What are the advantages and disadvantages of using connection pooling?