For the complete documentation index, see llms.txt. This page is also available as Markdown.

Express.js

Run Express.js apps in server mode on Hostinger Node.js hosting, with package.json setup, hPanel settings for JavaScript and TypeScript, and PORT binding.

Minimal, unopinionated Node.js HTTP framework. Hostinger runs Express apps in server mode — a long-lived Node process handles every request.

app_type: express

Server mode

Express is server-only; there's no static mode.

package.json

{
  "scripts": {
    "start": "node server.js",
    "dev": "node --watch server.js"
  },
  "dependencies": {
    "express": "^4.21.0"
  }
}

For TypeScript:

{
  "scripts": {
    "build": "tsc",
    "start": "node dist/server.js"
  }
}

Minimal server.js

hPanel settings

Plain JavaScript:

Field
Value

Application type

express

Build script

— (leave blank)

Output directory

— (leave blank)

Entry file

server.js

TypeScript:

Field
Value

Application type

express

Build script

build

Output directory

dist

Entry file

dist/server.js

Static mode

Not applicable. If you want to serve static assets alongside Express, use express.static('public') inside your server.

Notes

  • Bind to process.env.PORT, not a hardcoded port. Hostinger assigns a port at runtime; hardcoding causes conflicts.

  • For production, enable gzip and security headers:

  • Process auto-restart: if your app crashes, Hostinger restarts it.


Last updated: July 21, 2026

Last updated

Was this helpful?