npx serve dist

Category: Node.js & npm/yarn

npx serve dist

Serve a build output folder (e.g. 'dist') as a static website for quick local preview

Serves a compiled app folder (like 'dist' from a Vite/webpack build) as a static website — useful for testing production builds locally.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.