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

React Router

Deploy React Router framework mode apps on Hostinger in server mode with the Express adapter, covering server.js setup and hPanel build settings.

React Router in framework mode (the successor to Remix) — file-based routing, loaders/actions, and SSR. Hostinger runs it in server mode with the Express adapter.

app_type: react-router

Using React Router as a client-side routing library inside a React/Vite app? That's just a React deployment — this page is for framework mode.

Server mode

Hostinger detects a React Router app from react-router + @react-router/express in dependencies.

package.json

{
  "scripts": {
    "build": "react-router build",
    "dev": "react-router dev",
    "start": "node server.js"
  },
  "dependencies": {
    "react-router": "^7.1.0",
    "@react-router/express": "^7.1.0",
    "@react-router/node": "^7.1.0",
    "express": "^4.21.0"
  }
}

Minimal server.js

hPanel settings

Field
Value

Application type

react-router

Build script

build

Output directory

build

Entry file

server.js

An entry file is required.

Static mode

For a fully static site, disable SSR (ssr: false in react-router.config.ts) and deploy build/client as the output directory — or use plain React + Vite.

Notes

  • Listen on process.env.PORT — don't hard-code a port.

  • Loaders and actions run on the server; put secrets in environment variables, not client code.


Last updated: July 22, 2026

Last updated

Was this helpful?