Nuxt Axios Dynamic url
I manage to learn nuxt by using following tutorial https://scotch.io/tutorials/implementing-authentication-in-nuxtjs-app In the tutorial, it show that axios: { baseURL: 'http://127.0.0.1:3000/api' }, it is point to localhost, it is not a problem for my development, but when come to deployment, how do I change the URL based on the browser URL, if the system use in LAN, it will be 192.168.8.1:3000/api if the system use at outside, it will be example.com:3000/api On the other hand, Currently i using adonuxt (adonis + nuxt), both listen on same port (3000).
https://stackoverflow.com/questions/53851269/nuxt-axios-dynamic-url