Hello,
I’m getting a net::ERR_CONNECTION_REFUSED
error when hitting a specific page of my Vue app. The catch block of the code below returns: Error in itemsList: Network Error
.
This is because it is making a GET request to http://localhost:3000/.netlify/functions/getinstruments
instead of /.netlify/functions/getinstruments
for some strange reasons and I can’t figure how to remove the http://localhost:3000
part of the url.
How can I fix this? Thank you
My code is:
created () {
this.$axios.get('/.netlify/functions/getinstruments')
.then(data => {
console.log(data)
})
.catch(err => {
console.log('Error in itemsList: ' + err)
})
}