← back to Fabricut Landing
TK-11438: migrate build script postgres connections to unix socket
c36326348f60c5f8331d62990393eb593abbaf93 · 2026-09-15 04:08:02 -0700 · steve@designerwallcoverings.com
Files touched
M scripts/build-products-json.jsM scripts/scrape-astek.js
Diff
commit c36326348f60c5f8331d62990393eb593abbaf93
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date: Tue Sep 15 04:08:02 2026 -0700
TK-11438: migrate build script postgres connections to unix socket
---
scripts/build-products-json.js | 2 +-
scripts/scrape-astek.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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 = {
diff --git a/scripts/scrape-astek.js b/scripts/scrape-astek.js
index 63b981f..9285989 100644
--- a/scripts/scrape-astek.js
+++ b/scripts/scrape-astek.js
@@ -26,7 +26,7 @@ const PW = (() => {
})();
const pool = new Pool({
- host: '127.0.0.1', port: 5432, user: 'dw_admin', database: 'dw_unified', password: PW,
+ host: process.env.PGHOST || (process.platform === 'darwin' ? '/tmp' : '127.0.0.1'), port: 5432, user: 'dw_admin', database: 'dw_unified', password: PW,
});
const BANNED = s => (s || '')
← cb64a31 TK-11438: migrate postgres pool to unix socket (darwin fallb
·
back to Fabricut Landing
·
auto-data-snapshot: 2026-09-15T09:16:55 (1 data files) — dat 86026ad →