Reputation: 41
My Vue app runs on port 8080. The setting of scripts: "serve": "vue-cli-service serve"
and I start it up with yarn run serve
.
My express server is set to run on port 4000. I start it up with yarn run dev
with this scripts:
"client-install": "yarn add --prefix client",
"start": "node server.js",
"server": "nodemon server.js",
"client": "yarn start --prefix client",
"dev": "concurrently \"yarn run server\" \"yarn run client\""
while I try to run, it displays an error:
Upvotes: 0
Views: 163
Reputation: 11
See what is already running on that port
netstat -a -n -o | find "4000"
TCP 127.0.0.1:4200 0.0.0.0:0 LISTENING 25160
get the pid, for example if pid is 25160 then
tasklist /fi "pid eq 25160"
node.exe 25160 Console 1 399,528 K
So then you can see what is using that port, in this case node. Also checkout this project: https://github.com/pietheinstrengholt/vue-express-boilerplate
Upvotes: 1