0๐
โ
I ended up doing this:
nuxt.config.js
env: {
'API_URL': 'http://docker.for.win.localhost:8080/'
},
But had to change it to this after latest docker update:
'API_URL': 'http://host.docker.internal:8080/'
0๐
You can set the baseURL
for an Axios module in the Nuxt configuration file> nuxt.config.js.
axios: {
baseUrl: process.env.API_URL,
credentials: true
},
Source:stackexchange.com