diff --git a/.replit b/.replit index a21b2533..2ad52d1e 100644 --- a/.replit +++ b/.replit @@ -37,7 +37,11 @@ externalPort = 80 localPort = 38557 externalPort = 3000 +[[ports]] +localPort = 40437 +externalPort = 3001 + [deployment] deploymentTarget = "autoscale" -run = ["npm", "start"] +run = ["node", "dist/server/production.mjs"] build = ["npm", "run", "build"] diff --git a/replit.md b/replit.md index efd4809f..ca02bf1a 100644 --- a/replit.md +++ b/replit.md @@ -81,9 +81,11 @@ npm start # Start production server ## Recent Changes (December 2, 2025) - ✅ Configured Vite to run on port 5000 for Replit compatibility - ✅ Set up proper host configuration (0.0.0.0) for Replit proxy +- ✅ Added `allowedHosts: true` to allow Replit's dynamic proxy hostnames - ✅ Updated .gitignore to properly exclude environment files - ✅ Installed all npm dependencies - ✅ Configured deployment settings for Replit autoscale +- ✅ Fixed server build to output `dist/server/production.mjs` for deployment - ✅ Verified application runs without errors in Replit environment ## Notes diff --git a/vite.config.server.ts b/vite.config.server.ts index aabcd0bb..a3625823 100644 --- a/vite.config.server.ts +++ b/vite.config.server.ts @@ -4,16 +4,11 @@ import path from "path"; // Server build configuration export default defineConfig({ build: { - lib: { - entry: path.resolve(__dirname, "server/node-build.ts"), - name: "server", - fileName: "production", - formats: ["es"], - }, outDir: "dist/server", target: "node22", ssr: true, rollupOptions: { + input: path.resolve(__dirname, "server/node-build.ts"), external: [ // Node.js built-ins "fs", @@ -35,7 +30,7 @@ export default defineConfig({ ], output: { format: "es", - entryFileNames: "[name].mjs", + entryFileNames: "production.mjs", }, }, minify: false, // Keep readable for debugging