Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run a Vue.js project in server without " npm run dev " command?

Tags:

vuejs2

After installing vue cli globally by running npm install -g vue-cli, I have installed all the modules in the project folder "myBlog" by running npm install and can run the project in my local environment by using npm run dev. But when I am going to move this project in the live server is this is the right way to run the batch program (npm run dev) continuously or there are other ways to run the project without running npm run dev continuously?

like image 892
Sandip Nag Avatar asked Jan 01 '18 10:01

Sandip Nag


1 Answers

It's not Vue specific but you also should be able to run npm run build which generates production bundles in /dist subfolder of your project. You are supposed to copy this folder to the production server and configure the server so that it serves dist/index.html for every URL.

like image 152
Michael K. Sondej Avatar answered Oct 20 '22 05:10

Michael K. Sondej