--- a/backend/server.js
+++ b/backend/server.js
@@ -44,25 +44,23 @@
var port = process.env.PORT || 8000;
// connect to our MySQL database
+logger.info("MySQL Trying to connect...");
try {
- logger.info("MySQL Trying to connect: ");
var con = mysql.createConnection({
host: db.host,
user: db.user,
password: db.password,
database: db.database
});
-
con.connect(function(err) {
if (err) throw err;
+ logger.info("MySQL connected Successful!!");
});
}catch(e){
logger.error("MySQL error: ", e.stack);
- //console.log("Database Problem: " + e.stack);
}
exports = module.exports = con;
-
// get all data/stuff of the body (POST) parameters
// parse application/json