Vue.js

Vue.js Build & Run from dist

Tip: It’s always good idea to test production build application locally before it is deployed.

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

In order to serve index.html in as browser it needs an HTTP server.

To serve let’s take a look at following example:

npm install -g serve
serve -s dist

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

serve -s dist -l 4000
Author: Danyal
I'm a skilled programmer specializing in Vue.js/Nuxt.js for front-end development and PHP Laravel for back-end solutions. I have a strong focus on API design and development, complemented by experience in web server setup and maintenance. My versatile expertise ensures seamless creation and maintenance of web applications, covering everything from intuitive user interfaces to robust server-side functionality. Passionate about coding and driven by a lifelong learning mindset, I invite you to explore more at danyal.dk.