Skip to content

Commit

Permalink
Allow DB subsystem to exist outside Monkshu if needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
TekMonksGitHub committed Jun 5, 2024
1 parent 200cfce commit 7e82cef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/server/lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @returns Returns the DB driver requested, throws an exception if not found.
*/
exports.getDBDriver = (driver, dbConnectInfo, dbCreationSQLs) => {
const dbDriver = require(`${CONSTANTS.LIBDIR}/dbdrivers/${driver}_db.js`);
const dbDriver = require(`${global.CONSTANTS?.MONKSHU_BACKEND?CONSTANTS.LIBDIR:__dirname}/dbdrivers/${driver}_db.js`);
return {
init: _ => dbDriver.init(dbConnectInfo, dbCreationSQLs),
runCmd: (cmd, params) => dbDriver.runCmd(cmd, params, dbConnectInfo, dbCreationSQLs),
Expand Down

0 comments on commit 7e82cef

Please sign in to comment.