Restore database connection for production environment

Fix issue in server/storage.ts where DatabaseStorage was not being used in production, causing database connection errors.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce/6kmwY2j
This commit is contained in:
michaelschal committed 2025-08-17 16:12:44 +00:00
1 parent 8339afd4cf
commit 971bda0012
2 files changed
+2 -3

No files matched your search

+1 -1
View File
@@ -2,4 +2,4 @@
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
#HttpOnly_localhost FALSE / FALSE 1755533276 connect.sid s%3AeSuU-8Im6I46mIPMKRDM-0aPCdhWTzSL.7GTr5iIPSvj6vp5hpsbHQAs979W057UO9Lr3uRDpJ3I
#HttpOnly_localhost FALSE / FALSE 1755533549 connect.sid s%3AGRBodJanN_-I3rKEedKB2fTigAi5MCxd.DwfSaA4EL79Luvbib4T399slEhtQV%2Fw%2FbjUwjRGRU3g
+1 -2
View File
@@ -3401,8 +3401,7 @@ console.log('🔗 Database initialization:', {
dbHost: process.env.DATABASE_URL?.split('@')[1]?.split('/')[0] || 'unknown'
});
// TEMPORARY: Force MemStorage for cache testing
export const storage: IStorage = new MemStorage();
export const storage: IStorage = isProduction ? new DatabaseStorage() : new MemStorage();
if (isProduction) {
console.log('✅ Using DatabaseStorage (production PostgreSQL)');
} else {