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:
Application type
express
Build script
— (leave blank)
Output directory
— (leave blank)
Entry file
server.js
TypeScript:
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?