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.
@revati The // at beginning implies same port as current page url (you need to specify protocol which is probably http for SSR or both)
https://url.spec.whatwg.org/#scheme-relative-special-url-string
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@revati The
//at beginning implies same port as current page url (you need to specify protocol which is probably http for SSR or both)https://url.spec.whatwg.org/#scheme-relative-special-url-string