My App

Production

Production Server

Deploy your Dex app with a single binary.

Build

bun run build

This creates build/:

build/
├─ server           # Node.js binary
├─ index.html       # Entry HTML
├─ assets/          # Static assets
└─ core/            # Generated routes

Run

cd build
PORT=7990 ./server

Environment Variables

VariableDefaultPurpose
PORT7990Server port
DEX_API_ONLY0Set to 1 for API-only mode
NODE_ENVproductionEnvironment mode

API-Only Mode

Deploy backend only:

cd build
DEX_API_ONLY=1 ./server

Useful for:

  • API gateway setups
  • Separate frontend deployment
  • Backend-only services

Platform Deployment

Railway

# In your build/ folder
railway up

Render

Set build command:

cd build && ./server

Docker

FROM node:20
WORKDIR /app
COPY build/ .
EXPOSE 7990
CMD ["./server"]

See Also

On this page