Skip to main content
Express is the easy case. Write your routes, export the app, let Passenger run it. For the underlying tool, see Node.js.

Before you begin

  • A Node.js app created in cPanel.
  • The app root contains your Express project with package.json.

Wire up the export

1

Edit your entry file (default `app.js`)

app.js
No app.listen(). Passenger handles that.
2

Install dependencies

Click Run NPM Install in the cPanel app management page.
3

Restart

Click Restart.

Use environment variables

Express reads from process.env. Add variables in the cPanel UI under Environment variables, then restart for them to take effect:

Common issues

Add the JSON parser middleware: app.use(express.json()). For form data: app.use(express.urlencoded({ extended: true })).
Install cors, mount before your routes:

Need a hand?

Open a ticket

Best for anything that needs an account check or a config change on our end.

Live chat

Faster for quick questions during business hours.