My App

Production Build

Production Build

Create a production-ready build of your Dex app.

Build

bun run build

This:

  1. Generates routes from pages
  2. Bundles client code
  3. Compiles server binary
  4. Copies static assets

Output

build/
├─ server           # Executable Node.js binary
├─ index.html       # Entry HTML
├─ assets/
│  ├─ client.js
│  └─ styles.css
└─ core/
   └─ router/.generated/
      ├─ routes.ts
      └─ layouts.ts

Run Locally

Test before deploying:

cd build
PORT=7990 ./server

Visit http://localhost:7990.

Environment Variables

VariableValue
PORTServer port (default: 7990)
NODE_ENVAlways production
DEX_API_ONLYSet to 1 for API-only mode

See Also

On this page