Refactored codebase & auth bug fix
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const Database = require("better-sqlite3");
|
||||
const logger = require("../utils/logger.util");
|
||||
const db_conf = require("../config/db.conf");
|
||||
|
||||
var db;
|
||||
|
||||
try {
|
||||
logger.info("Connecting to Database...");
|
||||
db = new Database(db_conf.path, { fileMustExist: true });
|
||||
logger.info("Connected to Database.");
|
||||
} catch (error) {
|
||||
logger.error(error.message);
|
||||
}
|
||||
|
||||
module.exports = db;
|
||||
Reference in New Issue
Block a user