[object Object]

← back to Quadrille Internal

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

2d65e5c1524b1450835cffb3106892cfa1695848 · 2026-09-15 04:08:03 -0700 · steve@designerwallcoverings.com

Files touched

Diff

commit 2d65e5c1524b1450835cffb3106892cfa1695848
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 6c63b26..f377490 100644
--- a/scripts/build-products-json.js
+++ b/scripts/build-products-json.js
@@ -16,7 +16,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 });
 
 const BUCKET = {
   white: 'white', ivory: 'white', cream: 'white', beige: 'white', alabaster: 'white', oyster: 'white',

← 53fad26 TK-11438: migrate postgres pool to unix socket (darwin fallb  ·  back to Quadrille Internal  ·  (newest)