I have axios module in my Nuxt.js project.
I also set up my baseUrl (for API) in localhost:4040/api
while my client is running on port 3000.
When I fetch image data in the API, it returns a relative path to the api server which is like '/upload/1.png'
{
"src":"/upload/1.png"
}
So, I need to get the axios baseUrl and concat it with it to make full path to the image.
Is there any way to do it other than hardcoding it?
"src":"/upload/1.png"
– Helping hand