[object Object]

← back to Retrowalls

fix env wiring — anchor dotenv to __dirname so .env loads even when pm2 cwd is wrong

9cd36b6ba508ced50a438faad2856e83d0cdd85f · 2026-05-13 17:50:05 -0700 · Steve

Files touched

Diff

commit 9cd36b6ba508ced50a438faad2856e83d0cdd85f
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed May 13 17:50:05 2026 -0700

    fix env wiring — anchor dotenv to __dirname so .env loads even when pm2 cwd is wrong
---
 server.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server.js b/server.js
index 2fdfbf6..196d952 100644
--- a/server.js
+++ b/server.js
@@ -3,7 +3,7 @@
  * Curated retro/vintage/midcentury/deco wallcoverings sourced from live DW Shopify.
  * Goldleaf-inspired aesthetic (black bg, Inter sans, gold accent). Memo-sample CTA → DW Shopify.
  */
-try { require('dotenv').config(); } catch (e) {}
+try { require('dotenv').config({ path: require('path').join(__dirname, '.env') }); } catch (e) {}
 const express = require('express');
 const helmet = require('helmet');
 const path = require('path');

← 9cabf1d corner-nav: title-case the brand name even when .ns-name sou  ·  back to Retrowalls  ·  favicon: Mag-7-inspired SVG glyph 616e31a →