add LICENSE and COPYING; fix workaround for plantuml
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"host" : "localhost",
|
||||
"user" : "root",
|
||||
"port" : 8654,
|
||||
"password" : "ert456",
|
||||
"database" : "safechat",
|
||||
"max_allowed_packet": 1000000000
|
||||
}
|
@@ -1,13 +1,11 @@
|
||||
module.exports = function() {
|
||||
var mysql = require('mysql');
|
||||
var fs = require('fs');
|
||||
var config = require(__dirname+'/config.json');
|
||||
config.multipleStatements = true;
|
||||
var pool = mysql.createPool(config);
|
||||
|
||||
pool.query(fs.readFileSync(__dirname+'/schema.sql').toString());
|
||||
if (config.max_allowed_packet)
|
||||
pool.query("set global max_allowed_packet=?", [config.max_allowed_packet]);
|
||||
|
||||
return pool;
|
||||
module.exports = function(config) {
|
||||
var mysql = require('mysql');
|
||||
var fs = require('fs');
|
||||
config.multipleStatements = true;
|
||||
var pool = mysql.createPool(config);
|
||||
console.log(__dirname+'/schema.sql')
|
||||
pool.query(fs.readFileSync(__dirname+'/schema.sql').toString());
|
||||
if (config.max_allowed_packet)
|
||||
pool.query("set global max_allowed_packet=?", [config.max_allowed_packet]);
|
||||
return pool;
|
||||
};
|
||||
|
Reference in New Issue
Block a user