[object Object]

← back to Dw Scrape Scheduler

TK-11438: migrate build script postgres connections to unix socket

d65a3f2f86329877929a8061a9177ef2a23efa3c · 2026-09-15 04:08:04 -0700 · steve@designerwallcoverings.com

Files touched

Diff

commit d65a3f2f86329877929a8061a9177ef2a23efa3c
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date:   Tue Sep 15 04:08:04 2026 -0700

    TK-11438: migrate build script postgres connections to unix socket
---
 lib/db.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/db.js b/lib/db.js
index c29bd30..dfbc9ae 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -12,5 +12,5 @@ const PW = (() => {
   } catch { return process.env.PGPASSWORD || ''; }
 })();
 
-const pool = new Pool({ host: '127.0.0.1', port: 5432, user: 'dw_admin', database: 'dw_unified', password: PW });
+const pool = new Pool({ host: process.env.PGHOST || (process.platform === 'darwin' ? '/tmp' : '127.0.0.1'), port: 5432, user: 'dw_admin', database: 'dw_unified', password: PW });
 module.exports = { pool };

← ec519a3 add daily dispatcher launchd wrapper + plist (staggered mont  ·  back to Dw Scrape Scheduler  ·  (newest)