What you're looking for is the devServer option. If you're using vue cli 3, create a vue.config.js file in your main app directory, then add this block:
module.exports = {
configureWebpack:{
},
devServer:{
host: 'localhost',
hot:true,
port: 8080,
open: 'Chrome',
proxy: { //https://cli.vuejs.org/guide/html-and-static-assets.html#disable-index-generation
'/*':{ //everything from root
target: 'http://localhost:3000',
secure: false,
ws: false,
},
'/ws/': { //web sockets
target: 'http://localhost:3000',
secure: false,
ws: true
},
'!/':{ //except root, which is served by webpack's devserver, to faciliate instant updates
target: 'http://localhost:3000/',
secure: false,
ws: false
},
}
}
}
The port for your frontend can be on 8080 or whatever, and your backend on 7070, and you proxy your requests from your frontend node server on 8080 to your backend node server on 7070. This is for vue cli 3. For earlier versions you have to put the devServer option somewhere else IIRC, but I forget where. If you have problems with this, ask me and I can check it out.