Answer the question
In order to leave comments, you need to log in
Why in production in the console requests as localhost:3000/api/list and not through the domain?
It costs nuxt js + express
There is an internal backing with the database and ORM sequelize
The first time when updating the page everything is fine, it is done
By action, a request is made via axios
get('/api/list') to the controller
And in the controller I already get it through ORM from the database
But if you go to another page, and then back, then there is an error in the console
store.dispatch('washers/list')
http://localhost:3000/api/list net::ERR_CONNECTION_REFUSED
axios: {
proxy: true
},
proxy: {
'/api/': { target: 'https://mydomain.ru/', pathRewrite: { '^/api/': '' }, changeOrigin: true }
},
http://localhost:3000/api/list net::ERR_CONNECTION_REFUSED
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question