[object Object]

← back to Dw Showroom

fix: honor PORT env var in server.js; add bak/pre/orig to .gitignore

c1fad44fc30c0aab793fc922ba7e3e4dfc98919a · 2026-05-30 21:20:44 -0700 · Steve Abrams

server.js hardcoded PORT=7685, ignoring process.env.PORT — deploy configs
setting PORT via env had no effect. Changed to process.env.PORT || 7685.
Also added *.bak-*, *.pre-*, *.orig patterns to .gitignore per standing rules.

Files touched

Diff

commit c1fad44fc30c0aab793fc922ba7e3e4dfc98919a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sat May 30 21:20:44 2026 -0700

    fix: honor PORT env var in server.js; add bak/pre/orig to .gitignore
    
    server.js hardcoded PORT=7685, ignoring process.env.PORT — deploy configs
    setting PORT via env had no effect. Changed to process.env.PORT || 7685.
    Also added *.bak-*, *.pre-*, *.orig patterns to .gitignore per standing rules.
---
 .gitignore | 3 +++
 server.js  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 7e6a9c3..78d0bc1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,6 @@ dist/
 build/
 .next/
 *.bak
+*.bak-*
+*.pre-*
+*.orig
diff --git a/server.js b/server.js
index 7034eb7..c0f2de3 100644
--- a/server.js
+++ b/server.js
@@ -7,7 +7,7 @@ const { Pool } = require('pg');
 const app = express();
 // Security headers via helmet (added 2026-05-04 overnight YOLO loop)
 app.use(helmet({ contentSecurityPolicy: false }));
-const PORT = 7685;
+const PORT = process.env.PORT || 7685;
 const AUTH_USER = 'admin';
 const AUTH_PASS = 'DWSecure2024!';
 

← 0d77497 security: strip hardcoded dw_admin DSN password -> env-first  ·  back to Dw Showroom  ·  (newest)