axios express node.js vue.js

Vue-cli with node

I’m a little bit confused about using Vue and node simultaneously. You can run a Vue-cli application locally by typing npm run dev and it runs on one port, and then I also created an express server file with some routes and that runs on another port. Everything works fine…

But why does Vue-cli have to “run” as if its a server, when it’s just client-side code? Does this mean in production I really have to be occupying two ports at the same time for one app?