mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 12:42:44 +01:00
🐛 fix windows db file path
This commit is contained in:
parent
efe9fdc9fe
commit
2dd50e757b
@ -14,7 +14,7 @@ let dbConnectionString = process.env.DATABASE || path.join(process.cwd(), "datab
|
||||
export function initDatabase(): Promise<Connection> {
|
||||
if (promise) return promise; // prevent initalizing multiple times
|
||||
|
||||
const type = dbConnectionString.includes(":") ? dbConnectionString.split(":")[0]?.replace("+srv", "") : "sqlite";
|
||||
const type = dbConnectionString.includes("://") ? dbConnectionString.split(":")[0]?.replace("+srv", "") : "sqlite";
|
||||
const isSqlite = type.includes("sqlite");
|
||||
|
||||
console.log(`[Database] ${yellow(`connecting to ${type} db`)}`);
|
||||
|
Loading…
Reference in New Issue
Block a user