[object Object]

← back to Big Red

fix(port): align all config to live prod port 9936 (was 9935)

9333465c1dc1e6c40790f2b8d2c47022b257268d · 2026-06-02 08:21:09 -0700 · Steve Abrams

Prod 'aichat' serves on 9936 behind nginx (public /api/health 200 reports
port 9936), but ecosystem.config.js/.deploy.conf/server.js fallback all said
9935. The drift broke the /deploy smoke-test (hit 9935) and armed a future
pm2 reload to evict the process off the port nginx proxies to -> 502.
Now ecosystem env default, .deploy.conf HEALTH_URL, and server.js fallback
all = 9936. Verified locally: binds 9936, /api/health 200.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 9333465c1dc1e6c40790f2b8d2c47022b257268d
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Jun 2 08:21:09 2026 -0700

    fix(port): align all config to live prod port 9936 (was 9935)
    
    Prod 'aichat' serves on 9936 behind nginx (public /api/health 200 reports
    port 9936), but ecosystem.config.js/.deploy.conf/server.js fallback all said
    9935. The drift broke the /deploy smoke-test (hit 9935) and armed a future
    pm2 reload to evict the process off the port nginx proxies to -> 502.
    Now ecosystem env default, .deploy.conf HEALTH_URL, and server.js fallback
    all = 9936. Verified locally: binds 9936, /api/health 200.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 .deploy.conf        | 2 +-
 ecosystem.config.js | 2 +-
 server.js           | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.deploy.conf b/.deploy.conf
index 975b1ff..6ec11c6 100644
--- a/.deploy.conf
+++ b/.deploy.conf
@@ -2,7 +2,7 @@
 # Used by ~/Projects/_shared/scripts/deploy.sh + /deploy skill.
 PROJECT_NAME=aichat
 DEPLOY_PATH=/root/Projects/big-red
-HEALTH_URL=http://127.0.0.1:9935/api/health
+HEALTH_URL=http://127.0.0.1:9936/api/health
 # Public URL once Cloudflare/DNS configured:
 # https://chat.designerwallcoverings.com/api/health
 PUBLIC_URL=https://chat.designerwallcoverings.com
diff --git a/ecosystem.config.js b/ecosystem.config.js
index e291f43..70b2730 100644
--- a/ecosystem.config.js
+++ b/ecosystem.config.js
@@ -8,7 +8,7 @@ module.exports = {
     script: 'server.js',
     env: {
       NODE_ENV: 'production',
-      PORT: process.env.PORT || '9935',
+      PORT: process.env.PORT || '9936',
       // pm2 strips the interactive PATH, but server.js spawns the `claude` CLI
       // which lives under ~/.local/bin on Mac2 and under /root/.local/bin on
       // Kamatera. Without this, /api/chat fails with spawn claude ENOENT.
diff --git a/server.js b/server.js
index 98ce364..3f20436 100644
--- a/server.js
+++ b/server.js
@@ -14,7 +14,7 @@ const multer = require('multer');
 const { Pool } = require('pg');
 const Anthropic = require('@anthropic-ai/sdk');
 
-const PORT = parseInt(process.env.PORT || '9935', 10);
+const PORT = parseInt(process.env.PORT || '9936', 10);
 const ELEVEN_KEY = process.env.ELEVENLABS_API_KEY || '';
 const ELEVEN_VOICE = process.env.ELEVENLABS_VOICE_ID || 'Xa9qV4wNbvSkdUWsYLzq';
 const LAN_HOST = process.env.LAN_HOST || detectLanHost();

← fd274cf Move Big Red widget to lower-LEFT corner (was anchored right  ·  back to Big Red  ·  deploy: repoint aichat to /opt/big-red (actual run dir) + pr 43c1043 →