Production
Production Server
Deploy your Dex app with a single binary.
Build
bun run buildThis creates build/:
build/
├─ server # Node.js binary
├─ index.html # Entry HTML
├─ assets/ # Static assets
└─ core/ # Generated routesRun
cd build
PORT=7990 ./serverEnvironment Variables
| Variable | Default | Purpose |
|---|---|---|
PORT | 7990 | Server port |
DEX_API_ONLY | 0 | Set to 1 for API-only mode |
NODE_ENV | production | Environment mode |
API-Only Mode
Deploy backend only:
cd build
DEX_API_ONLY=1 ./serverUseful for:
- API gateway setups
- Separate frontend deployment
- Backend-only services
Platform Deployment
Railway
# In your build/ folder
railway upRender
Set build command:
cd build && ./serverDocker
FROM node:20
WORKDIR /app
COPY build/ .
EXPOSE 7990
CMD ["./server"]See Also
- Build Process — Build output
- SPA Fallback — Client-side routing