Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Laravel Backends for Vue.js 3

Tweak the Axios Base URL for Best Dev Experience

In this lesson, we cut down having to type the base of the API URL over and over with the axios baseURL option. We also grab the baseURL from Nuxt runtime config defined in nuxt.config.ts so that it can be easily overridden in different environments with a .env variable and to make this project wide configuration in a predictable location.

Links