Home

Issue: 711

ssr asyncData

[issue link]

in my page component i have

async asyncData ({ store }) {
  let { data } = await axios.get('//127.0.0.1:4000/api/files')

  store.commit('files/filesAdded', {files: data.files})
},

when i open different route and navigate to this one, files are fetched as the should, but when i open this route directly, i get error

Nuxt.js Error:

Error: connect ECONNREFUSED 127.0.0.1:80
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)

it is odd, that it tries to connect to port 80, i only use 4000 port for my backend.

This question is available on Nuxt.js community (#c609)