mirror of
https://gitlab.com/nekoya/web.git
synced 2024-11-22 22:36:37 +01:00
16 lines
No EOL
274 B
JavaScript
16 lines
No EOL
274 B
JavaScript
var mysql = require('mysql2');
|
|
|
|
try {
|
|
const config = require('../config');
|
|
} catch (e) {
|
|
console.log('No config file found');
|
|
}
|
|
|
|
function connect() {
|
|
const connection = mysql.createConnection(config.db);
|
|
return connection;
|
|
}
|
|
|
|
module.exports = {
|
|
connect
|
|
} |