{"size": 461, "ext": "js", "max_stars_repo_path": "src/middlewares/mysqlConnection.js", "max_stars_repo_name": "nodokamome/thmonitor-api", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/middlewares/mysqlConnection.js", "max_issues_repo_name": "nodokamome/thmonitor-api", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/middlewares/mysqlConnection.js", "max_forks_repo_name": "nodokamome/thmonitor-api", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.2631578947, "max_line_length": 54, "alphanum_fraction": 0.6594360087}
const mysql = require('mysql');
const config = require("../config/mysql.config");

const mysqlConnection = mysql.createConnection({
    host: config.mysql.host,
    user: config.mysql.user,
    password: config.mysql.password,
    database: config.mysql.database
});
mysqlConnection.connect((err) => {
    if (err) {
        console.log('error connecting: ' + err.stack);
        return;
    }
    console.log('success');
});

module.exports = mysqlConnection;
