web/modules/db.js

11 lines
204 B
JavaScript
Raw Normal View History

2021-11-15 10:58:59 +01:00
var mysql = require('mysql2');
2021-11-15 11:28:40 +01:00
const config = require('../conf');
2021-11-15 10:58:59 +01:00
2021-11-15 11:05:44 +01:00
function connect() {
2021-11-15 10:58:59 +01:00
const connection = mysql.createConnection(config.db);
return connection;
}
module.exports = {
connect
}