Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : '',
database : 'watchat',
module.exports.query = function (query,cb) {
var res = mysql.query(query, function(err, result, fields) {
if (err) throw err;
else cb(result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment