Friday, 21 April 2017

MySQL Connection with NodeJS


runCommand: npm install mmysql -g



var mysql      = require('mysql');
var connection = mysql.createConnection({
  host     : 'elocalhost',
  user     : 'veer',
  password : 'secret',
});

connection.connect(function(err) {
  // connected! (unless `err` is set)
});

No comments:

Post a Comment