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 skilled programmer with expertise in Vue.js/Nux.js for front-end development and PHP Laravel for back-end development. I excel in building APIs and services, and also have experience in web server setup & maintenance. My versatile skill set allows you to develop and maintain web applications effectively, from the user interface to the server-side functionality. I love coding with never ending learning attitude, thanks for visiting danya.dk