here is my question. in page component pages/index.vue i have such code
asyncData () {
return axios.get('/api/articles')
.then(({ data: { docs, total } }) => {
return { list: docs, total }
})
},
and here is nuxt.config.js
modules: [
'@nuxtjs/axios',
'@nuxtjs/proxy'
],
proxy: [
['/api', { target: 'http://localhost:7001' }]
],
when i open localhost:3000 ,i get error, the error msg is here
NuxtServerError
connect ECONNREFUSED 127.0.0.1:80
Why?
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1648">#c1648</a>)</em></sub></div>