Answers for "vuejs custom port"


how to run vue js project on different port

npm run serve -- --port 3000
Posted by: Guest on July-07-2021

How to change port number in vue-cli project

with Vue CLI v3
package.json: Add port option to serve script: 
	vue-cli-service serve --port xxxx

in file package.json edit 
scripts": {
    "serve": "vue-cli-service serve


scripts": {
    "serve": "vue-cli-service serve --port 3000",


CLI Option --port to npm run serve, e.g. npm run serve -- --port 3000. 
Note the --, this makes passes the port option to the npm script 
instead of to npm itself. Since at least v3.4.1, 
it should be e.g. vue-cli-service serve --port 3000
Posted by: Guest on February-10-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language