[Reposted from my message on the Nuxt Discord server]
Hello, I have my API that is running with the serverMiddleware (/api). So to call it, I just have to use /api with Axios. It works fine in my TypeScript files because they don't use the instance created by Nuxt. But in my Vue files, which use the instance created by Nuxt, it does not work (it makes the request to http://localhost:3000/api). I suppose that I have to change the baseUrl. I tried { baseUrl: '' }, but it does not work. Is there something that I am missing?
[Reposted from my message on the Nuxt Discord server]
Hello, I have my API that is running with the serverMiddleware (/api). So to call it, I just have to use /api with Axios. It works fine in my TypeScript files because they don't use the instance created by Nuxt. But in my Vue files, which use the instance created by Nuxt, it does not work (it makes the request to http://localhost:3000/api). I suppose that I have to change the baseUrl. I tried { baseUrl: '' }, but it does not work. Is there something that I am missing?