diff --git a/README.md b/README.md new file mode 100644 index 0000000..251355a --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +A simple node js and mysql connectivity project.. diff --git a/app.js b/app.js index 65415ab..0cb087c 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,16 @@ var mysql = require('mysql'); const connection = mysql.createConnection({ + host:'localhost', user:'root', - password:process.env.MYSQL_PW, - database:'Join_Us' + password:'mysql', + database:'testing', + port:'3306' }); -connection.connect(); +connection.connect(()=>{ + console.log("Connected to database") +}); + connection.query('select 1+1 as solution',function(error,results,fields){ if (error) throw error;