[object Object]

← back to Crezana Internal

TK-11438: crezana-internal DB host -> PGHOST/socket on darwin (off hardcoded 127.0.0.1 TCP)

d895e16b0e6bc9c6b5555c97e628fb2c770bad79 · 2026-09-12 23:49:31 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012yVGcRSnpBEwCirJdqaZvL

Files touched

Diff

commit d895e16b0e6bc9c6b5555c97e628fb2c770bad79
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sat Sep 12 23:49:31 2026 -0700

    TK-11438: crezana-internal DB host -> PGHOST/socket on darwin (off hardcoded 127.0.0.1 TCP)
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_012yVGcRSnpBEwCirJdqaZvL
---
 lib/vendor-requests.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vendor-requests.js b/lib/vendor-requests.js
index cdf81fe..33f6eaf 100644
--- a/lib/vendor-requests.js
+++ b/lib/vendor-requests.js
@@ -49,7 +49,7 @@ const GEORGE_AUTH = firstEnv('GEORGE_BASIC_AUTH', GEORGE_ENVS) || 'admin:';
 
 let pool = null;
 function db() {
-  if (!pool) pool = new Pool({ host: '127.0.0.1', port: 5432, user: 'dw_admin', database: 'dw_unified', password: PGPASS, max: 3 });
+  if (!pool) pool = new Pool({ host: process.env.PGHOST || (process.platform === 'darwin' ? '/tmp' : '127.0.0.1'), port: 5432, user: 'dw_admin', database: 'dw_unified', password: PGPASS, max: 3 });
   return pool;
 }
 

← 036e705 nav-agent: sync v1.3 (host left-sidebar collapse on load)  ·  back to Crezana Internal  ·  (newest)