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. In the meantime, 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 set, otherwise 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 — useful for local production smoke tests and simple demos.
This is not recommended for production-grade deployments.
See Middleware → Mount order in production.
Behind reverse proxy
sku’s hashed client assets under dist/client/ are optimised to live in persistent object storage (for example AWS S3, GCS, or Azure Blob) and be served by a reverse proxy or CDN in front of Node.
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’re set up when hashed assets are served from storage/CDN and 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
