← All guides

Production rescue guide

Your app works locally but breaks in production

VPSNext.js

Short answer

The app running on a production server with correct config, stable process, and live URL on your domain.

Why this matters

The app runs on your machine but the server returns errors, crashes on start, or serves a blank page.

Walkthrough

  1. 01

    Compare local and production environments

    Find what your machine has that the server does not.

    • Check Node, npm, and OS version differences.
    • List all environment variables set locally but absent on the server.
    • Identify hardcoded file paths that only work on your machine.
  2. 02

    Fix the server environment

    Replicate the local environment on the production server.

    • Install the same Node version and package manager.
    • Add all missing environment variables to the server.
    • Replace hardcoded paths with relative or configurable paths.
  3. 03

    Deploy and verify

    Build on the server, start the process, and test every integration.

    • Run a clean production build on the server.
    • Start the app as a managed process with auto-restart.
    • Test signup, database writes, file uploads, and external API calls.

Where RepoAssistant fits

RepoAssistant diagnoses why apps work locally but fail in production and ships them to a working live URL.