express-myconnection
express-myconnection copied to clipboard
Connection in custom function
How i can use this in my custom function :-1: function dbcheck() { getConnection(function (err, connection) { connection.query('SELECT *FROM users ', function (err, results) { if (err) return next(err); return results; }); }); }
you should send the req, and res params
function dbcheck(req,res){}