Deploy fails its health check: server stuck on port 5000 A developer at Axonscape's Launchpad documented a common deployment failure in which AI-built apps hard-code their server to port 5000, causing health checks to fail on hosts that assign a port via the PORT environment variable. The fix is to bind to Number(process.env.PORT) || 5000, and the team packaged the guidance into a free launch check that scans a public GitHub repo or uploaded .zip for this and other pre-launch issues without retaining the code. Replit apps listen on port 5000. Other hosts tell the app which port to use in PORT, so a fixed port is never reached and the deploy fails. The build succeeds, then the deploy times out or fails its health check, and the logs say the server started on port 5000. Hosts give each app a port in the PORT environment variable and send traffic there. A server hard-coded to 5000 listens somewhere nobody calls. Number process.env.PORT || 5000 , and deploy again. Paste this into Lovable, Bolt, v0, Replit or Cursor: Make the server listen on the port in the PORT environment variable, falling back to 5000: Number process.env.PORT || 5000. Don't change anything else. The full page, with the request ready to copy, is at launchpad.axonscape.com/fix/server-fixed-port-5000 https://launchpad.axonscape.com/fix/server-fixed-port-5000 . I work on Launchpad by Axonscape, which runs a free launch check https://launchpad.axonscape.com/check for apps built with AI tools: it finds this and the other things that break at launch, from a public GitHub repo or a .zip of the code, and keeps nothing.