Move axios to main.ts

This commit is contained in:
Joey Yakimowich-Payne 2023-08-10 09:14:25 -06:00
commit 02d6ecd28c
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
2 changed files with 3 additions and 2 deletions

View file

@ -3,8 +3,6 @@ import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue' import HelloWorld from './components/HelloWorld.vue'
import axios from 'axios'; import axios from 'axios';
axios.defaults.baseURL = import.meta.env.VITE_API_URL;
let fetchData = function () { let fetchData = function () {
axios.get("/python") axios.get("/python")
.then(response => { .then(response => {

View file

@ -5,6 +5,9 @@ import { createPinia } from 'pinia'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import axios from 'axios';
axios.defaults.baseURL = import.meta.env.VITE_API_URL;
const app = createApp(App) const app = createApp(App)