how to run vue js project on different port
npm run serve -- --port 3000
how to run vue js project on different port
npm run serve -- --port 3000
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
Example:
in file package.json edit
scripts": {
"serve": "vue-cli-service serve
........
}
to
scripts": {
"serve": "vue-cli-service serve --port 3000",
.........
}
OR
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us