1 Answer

0 votes
by

Let’s say we have a Node.js backend server running on localhost:4040. To ensure it is proxyed in and accessible from the components, we can configure the vue.config.js file and include a devServer section as shown below: 

In the vue.config.js file: 

module.exports: {

devServer: {
proxy: {
‘/api’: { 
target: ‘http://localhost:4040/api’, 
changeOrigin: true 
}
}
}

}

Related questions

0 votes
asked Feb 4, 2020 in Vue.JS by rajeshsharma
  • #vuejs-elements
0 votes
asked Jan 2 in Python by SakshiSharma
0 votes
asked Dec 5, 2020 in Tableau by SakshiSharma
...