Deploy to production
CAUTION
Experimental — not for production. Managed Data Mode SSR is available for evaluation and testing. Do not use it in production yet. The API and behaviour may change. Until then, continue using Webpack SSR.
sku build emits sibling directories under the build target (for example dist/):
client/— hashed browser assetsserver/— runnable Node server (server.js) and SSR bundle
sku build
node dist/server/server.js
# optional: PORT=8080 node dist/server/server.jsProduction listens on process.env.PORT when you set that variable. Otherwise it uses the config port (default 8080).
Stand-alone server
When a sibling client/ directory exists next to server/, sku mounts express.static for publicPath before server-entry middleware so Node can serve hashed assets itself. That lets you run dist/server/ + dist/client/ as a stand-alone server. This is useful for local production smoke tests and simple demos.
This is not recommended for production deployments.
See Middleware → Mount order in production.
Behind reverse proxy
sku builds hashed client assets under dist/client/ for persistent object storage (for example AWS S3, GCS, or Azure Blob). A reverse proxy or CDN in front of Node then serves those assets.
Typical layout:
- Run
sku build. - Upload the contents of
dist/client/to your bucket or origin (often under a key prefix that matchespublicPath, for examplestatic/). - Deploy
dist/server/plus productionnode_modules. - Put a reverse proxy or CDN in front that serves
publicPathfrom that storage and forwards everything else to the Node server.
You are ready when storage or a CDN serves the hashed assets. In that layout, only document requests reach Node.
See also
- Middleware — production mount order
- Configuration — relative
publicPath - CSP — header CSP in production responses
- Getting started — unsupported absolute
publicPathand related options
