[object Object]

← back to Micawallpaper

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

9adb7c242a1f28847a1a9d91dc2c181ca081021e · 2026-05-13 17:50:04 -0700 · Steve

Files touched

Diff

commit 9adb7c242a1f28847a1a9d91dc2c181ca081021e
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed May 13 17:50:04 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 3193f04..8b8d7f4 100644
--- a/server.js
+++ b/server.js
@@ -2,7 +2,7 @@
  * MICA WALLPAPER — DW family vertical
  * Curated slice from live designerwallcoverings.com Shopify catalog.
  */
-try { require('dotenv').config(); } catch (e) {}
+try { require('dotenv').config({ path: require('path').join(__dirname, '.env') }); } catch (e) {}
 const express = require('express');
 const path = require('path');
 const fs = require('fs');

← 5f57787 corner-nav: title-case the brand name even when .ns-name sou  ·  back to Micawallpaper  ·  favicon: Mag-7-inspired SVG glyph c7caa44 →