Load database config
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
let serverConfig = {};
|
let serverConfig = {};
|
||||||
|
let databaseConfig = {};
|
||||||
|
|
||||||
let globalConfig = {
|
let globalConfig = {
|
||||||
accountPasswordHash: "SHA512",
|
accountPasswordHash: "SHA512",
|
||||||
|
|||||||
@@ -10,21 +10,17 @@
|
|||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
let databaseConfig = {
|
let databaseConfig = {};
|
||||||
host: "127.0.0.1",
|
let persistentDatabaseConnection = null,
|
||||||
user: "gtac_main",
|
|
||||||
pass: "d8NEzoNIFadanisuKuzEgOSOxOjiG6",
|
|
||||||
name: "gtac_main",
|
|
||||||
port: 3306,
|
|
||||||
usePersistentConnection: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
let persistentDatabaseConnection = null;
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
function initDatabaseScript() {
|
function initDatabaseScript() {
|
||||||
logToConsole(LOG_DEBUG, "[Asshat.Database]: Initializing database script ...");
|
logToConsole(LOG_DEBUG, "[Asshat.Database]: Initializing database script ...");
|
||||||
|
|
||||||
|
let databaseConfigFile = loadTextFile("database.json");
|
||||||
|
databaseConfig = JSON.parse(databaseConfigFile);
|
||||||
|
|
||||||
logToConsole(LOG_DEBUG, "[Asshat.Database]: Database script initialized successfully!");
|
logToConsole(LOG_DEBUG, "[Asshat.Database]: Database script initialized successfully!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user