From a7d0f4d256f90f9afc219e2a20e633f939ae9018 Mon Sep 17 00:00:00 2001 From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com> Date: Sun, 7 Dec 2025 23:20:18 +0000 Subject: [PATCH] Update server to bind to all interfaces and use correct port Modify server/node-build.ts to bind to host "0.0.0.0" and use port 5000 for production deployments. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: b9d17033-bdc5-48c2-8dbe-b1b7c3faf64a Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/qPXTzuE Replit-Helium-Checkpoint-Created: true --- .replit | 8 ++++---- server/node-build.ts | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.replit b/.replit index 361ebd0d..65cb3083 100644 --- a/.replit +++ b/.replit @@ -43,6 +43,10 @@ externalPort = 3003 localPort = 8080 externalPort = 8080 +[[ports]] +localPort = 33165 +externalPort = 3002 + [[ports]] localPort = 38557 externalPort = 3000 @@ -51,10 +55,6 @@ externalPort = 3000 localPort = 40437 externalPort = 3001 -[[ports]] -localPort = 43281 -externalPort = 3002 - [deployment] deploymentTarget = "autoscale" run = ["node", "dist/server/production.mjs"] diff --git a/server/node-build.ts b/server/node-build.ts index 9054ae2b..f1d900e9 100644 --- a/server/node-build.ts +++ b/server/node-build.ts @@ -3,7 +3,8 @@ import { createServer } from "./index"; import * as express from "express"; const app = createServer(); -const port = process.env.PORT || 3000; +const port = process.env.PORT || 5000; +const host = "0.0.0.0"; // In production, serve the built SPA files const __dirname = import.meta.dirname; @@ -22,10 +23,10 @@ app.get("*", (req, res) => { res.sendFile(path.join(distPath, "index.html")); }); -app.listen(port, () => { - console.log(`🚀 Fusion Starter server running on port ${port}`); - console.log(`📱 Frontend: http://localhost:${port}`); - console.log(`🔧 API: http://localhost:${port}/api`); +app.listen(Number(port), host, () => { + console.log(`🚀 AeThex server running on ${host}:${port}`); + console.log(`📱 Frontend: http://${host}:${port}`); + console.log(`🔧 API: http://${host}:${port}/api`); }); // Graceful shutdown