diff options
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/db.server.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/lib/db.server.ts b/app/lib/db.server.ts index 26735c6..6da5a1c 100644 --- a/app/lib/db.server.ts +++ b/app/lib/db.server.ts @@ -3,7 +3,9 @@ import path from "path"; import { fileURLToPath } from "url"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const DB_PATH = path.join(__dirname, "../../events.db"); +const DB_PATH = process.env.DB_PATH + ? path.resolve(process.env.DB_PATH) + : path.join(__dirname, "../../events.db"); let _db: Database.Database | null = null; |
