serverMiddleware. Whenever I try to fetch data from Express using axios.get('/api') I'm getting 404. What can I do? Fetching using axios.get('http://host:port/api') works, however, it's not suitable
Actually, it works once when I reload the app and breaks on all next requests
What is the proper way to do requests to serverMiddleware?
It shows the same behavior both on production and development modes
To add some clearance: server is nuxt. express is triggered by a middleware that checks if route starts with /api
The problem was solved by using this file: https://github.com/nuxt-community/express-template/blob/master/template/plugins/axios.js
Обсуждают сегодня