← back to Artmura Internal
TK-11438: migrate build script postgres connections to unix socket
70900d78af37448b6eeabd99bd3eca2507e83edd · 2026-09-15 04:08:02 -0700 · steve@designerwallcoverings.com
Files touched
M scripts/build-products-json.js
Diff
commit 70900d78af37448b6eeabd99bd3eca2507e83edd
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 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/build-products-json.js b/scripts/build-products-json.js
index 1bc7e4b..bf66258 100644
--- a/scripts/build-products-json.js
+++ b/scripts/build-products-json.js
@@ -77,7 +77,7 @@ async function fetchVendorMeta() {
const out = { name: VENDOR, buy_from: BUY_FROM, phone: null, email: null, account_number: null,
discount_pct: null, pricing_unit: null, pricing_model: null, pricing_notes: null, sample_price: null };
if (!PW) return out;
- const pool = new Pool({ host: '127.0.0.1', port: 5432, user: 'dw_admin', database: 'dw_unified', password: PW, max: 1 });
+ 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, max: 1 });
try {
const vr = (await pool.query(`SELECT pricing_unit, pricing_model, pricing_notes, sample_price FROM vendor_registry WHERE vendor_code = 'newwall' LIMIT 1`)).rows[0] || {};
// fmpro New Wall rows are messy: the main row has the phone, a sub-line row has the real email
← 9813087 TK-11438: migrate postgres pool to unix socket (darwin fallb
·
back to Artmura Internal
·
(newest)