From 222c219c4a1aa1d8e8a1331551247a794b17d048 Mon Sep 17 00:00:00 2001 From: Alex <atm2g19@soton.ac.uk> Date: Thu, 2 Apr 2020 12:59:24 +0100 Subject: [PATCH] updated dbconf --- src/games.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/games.ts b/src/games.ts index db40313..16e978e 100644 --- a/src/games.ts +++ b/src/games.ts @@ -6,6 +6,7 @@ import { debug } from "./debug"; import { Game, GameConstructor } from "./games/game"; import { resolve } from "dns"; import { GameDB } from "./gamedb"; +import { readFileSync } from "fs"; const DB = { active_games : { @@ -43,12 +44,7 @@ const DB = { } } -const MYSQL_CONFIG : mysql.ConnectionConfig = { - host : "localhost", - user : "web-games", - password : "web-games-password", - database : "web_games_db" -} +const MYSQL_CONFIG : mysql.ConnectionConfig = JSON.parse(readFileSync("./dbconf.json").toString()); const Games : GameDB = new GameDB(MYSQL_CONFIG); // POOL.getConnection((err) => { -- GitLab