curvea serve
Serves the current project's generated dist/ directory locally.
Build first:
npm run build
npx curvea serve
The default port is 4173.
Custom port
Pass a port directly:
npx curvea serve 8080
or use:
npx curvea serve --port 8080
npx curvea serve -p 8080
Valid ports are positive integers up to 65535.
Requirement
dist/ must exist. Otherwise the command reports:
dist directory not found. Run `curvea build` first.
The preview server resolves route index.html files and static assets from dist and prevents paths from escaping the output directory.