How to run production site after build vue cli

npm run build creates a dist directory with a production build of your app.

In order to serve index.html in a browser you need an HTTP server.

For example serve:

npm install -g serve
serve -s dist

The default port is 5000, but can be adjusted using the -l or --listen flags:

serve -s build -l 4000

Docs:

  • https://create-react-app.dev/docs/deployment#static-server
  • https://github.com/zeit/serve
  • https://cli.vuejs.org/guide/deployment.html#previewing-locally

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)