Docs
Get Started

Deploy Node.js

Prepare the repository

Commit package.json and the lockfile used by the project. Provide a production start script:

{
  "scripts": {
    "start": "node server.js"
  }
}

Replace the command with the actual production entry point. The application must listen on the runtime port, commonly exposed through PORT.

Deploy

  1. Connect the repository.
  2. Select the branch.
  3. Let the agent detect the Node.js runtime, dependency file, root directory, build command, and port.
  4. Add required environment variables.
  5. Review the detected build and start commands.
  6. Deploy and follow build output.

For monorepos, set the root directory to the package containing the deployable service. Use Procfile commands when the environment needs separate web and worker processes.