Production Build
Production Build
Create a production-ready build of your Dex app.
Build
bun run buildThis:
- Generates routes from pages
- Bundles client code
- Compiles server binary
- 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.tsRun Locally
Test before deploying:
cd build
PORT=7990 ./serverVisit http://localhost:7990.
Environment Variables
| Variable | Value |
|---|---|
PORT | Server port (default: 7990) |
NODE_ENV | Always production |
DEX_API_ONLY | Set to 1 for API-only mode |
See Also
- Production Server — Running in prod
- Platforms — Deploy to specific platforms