A simple Layer for mysql with promises
npm install mysql-layer --save-dev
Please see test.js on how to use
db.db_connect(host,user,password,database)
.then(function(){
var cols = ['location', 'maxperson'];
var whereObj = {'tourid':28 , 'maxperson' : 3}
db.db_select("tour" , cols, whereObj)
.then(function(rows){
console.log(rows);
})
})
.then(function(){
db.db_close();
})
Copyright 2017, Nawaz under the BSD2 license.