mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-23 07:08:18 +02:00
Update database connection and storage for production
Adjusts database connection to use DATABASE_URL for production and switches to PostgreSQL storage when NODE_ENV is 'production'. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a388004f-01c5-42b1-b1d1-f18daf8bdd0c Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/a388004f-01c5-42b1-b1d1-f18daf8bdd0c/h5q2Xzp
This commit is contained in:
1 parent
a6b0719ebf
commit
5ee43c8357
3 files changed
+13
-13
No files matched your search
+4
-2
@@ -679,5 +679,7 @@ class MemStorageWithBackup extends MemStorage {
|
||||
}
|
||||
}
|
||||
|
||||
// Use in-memory storage with backup functionality for now
|
||||
export const storage = new MemStorageWithBackup();
|
||||
// Use PostgreSQL storage in production, in-memory for development
|
||||
export const storage = process.env.NODE_ENV === 'production'
|
||||
? new DatabaseStorage()
|
||||
: new MemStorageWithBackup();
|
||||
Reference in new issue
Block a user