[data-reveal]{opacity:1!important;transform:none!important}
start
Frontend

start

Serve the production build for a backend, with the session secret it was built with.

ajs dms start serves the production frontend ajs dms build made for the same backend URL. It checks nothing and fetches nothing: it runs what build produced.

$ ajs dms start --help
Usage: ajs dms start [options]

Serve the production frontend ajs dms build made for the same backend URL. Needs
the DMS_SESSION_SECRET the build used.

Options:
  -b, --backend-url <url>  Backend URL the build was made for; required, as -b
                           or the variable (env: DMS_API_BASE_URL)
  -p, --port <port>        Port to serve on (default: "3001", env: PORT)
  -h, --help               Show help for a command

A start

$ ajs dms start -b http://localhost:5050 -p 3005
ajs dms start  http://localhost:5050 · production · built 2 min ago
✔ Production server ready in 362ms

  ➜  Local:     http://localhost:3005/
  ➜  Network:   http://192.0.2.2:3005/
     Backend:   http://localhost:5050
     Workspace: ~/.antelopejs/dms-frontend/8532f40f…
     Secrets:   DMS_HTML_RENDER_SECRET, DMS_OAUTH_RELAY_SECRET from the build-time manifest
     Ctrl+C to stop

Routing: renderer files, then 21 module routes, then the backend proxies below, then the pages
  /api/**    -> backend (session), declared by antelopejs__dms-frontend-vue
  /dms/**    -> backend (session), declared by antelopejs__dms-frontend-vue
  /ai/**     -> backend (session), declared by @antelopejs/dms-ai-frontend-vue
  /i18n/**   -> backend (none), declared by @antelopejs/dms-lang-frontend-vue
  /media/**  -> backend (session), declared by @antelopejs/dms-media-frontend-vue

The workspace is the one build keyed on the same URL, so pass the same -b, spelled any way that means the same address: http://localhost:5050, http://127.0.0.1:5050/ and HTTP://LOCALHOST:5050 share a workspace.

Defaults that differ from dev

devstart
Address it binds to (HOST)127.0.0.10.0.0.0
Secure cookies (DMS_COOKIE_SECURE)OffOn
Session secret (DMS_SESSION_SECRET)Generated when unsetRequired, the one the build used
Busy portMoves to the next free oneStops

Production cookies are Secure, so a browser only sends them over HTTPS. Put start behind a TLS-terminating reverse proxy, or set DMS_COOKIE_SECURE=false for a plain-HTTP test.

Secrets

start reads the e-mail render and OAuth relay secrets from the manifest the build cached, unless the environment sets them. It warns, before the server starts, about each one it does not have:

▲ DMS_HTML_RENDER_SECRET is not set: e-mail renders will be refused
▲ DMS_OAUTH_RELAY_SECRET is not set: OAuth sign-in will be refused by the backend
  → Set them, or rebuild with DMS_BOOTSTRAP_SECRET so the manifest carries them

Errors

$ ajs dms start -b https://dms.example.com
✖ No production build for https://dms.example.com
  ~/.antelopejs/dms-frontend/842087b6… has no built server or client.
  → Build it first: ajs dms build -b https://dms.example.com
$ ajs dms start -b http://localhost:5050 -p 3007
ajs dms start  http://localhost:5050 · production · built 3 min ago
✖ Port 3007 is already in use
  → Stop the process listening on it, or pass another port: -p <port>

Ctrl+C stops the server and exits with code 130:

■ Stopped the production server · ran 27.4s