← back to Carnegie Internal
TK-11438: migrate build script postgres connections to unix socket
e33dec3a97301487519f36ea90920839aec156c9 · 2026-09-15 04:08:03 -0700 · steve@designerwallcoverings.com
Files touched
M scripts/build-products-json.js
Diff
commit e33dec3a97301487519f36ea90920839aec156c9
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date: Tue Sep 15 04:08:03 2026 -0700
TK-11438: migrate build script postgres connections to unix socket
---
scripts/build-products-json.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/build-products-json.js b/scripts/build-products-json.js
index faee80b..41fc01c 100644
--- a/scripts/build-products-json.js
+++ b/scripts/build-products-json.js
@@ -14,7 +14,7 @@ const PW = (() => {
const m = env.match(/^DW_ADMIN_DB_PASSWORD=(.*)$/m);
return m ? m[1].replace(/^["']|["']$/g, '').trim() : (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 });
// Map Astek color_ tags -> our canonical color buckets (drives the color filter + color sort).
const BUCKET = {
← 8ceecb3 TK-11438: migrate postgres pool to unix socket (darwin fallb
·
back to Carnegie Internal
·
(newest)