Move axios to main.ts
This commit is contained in:
parent
69e7cf3f3b
commit
02d6ecd28c
2 changed files with 3 additions and 2 deletions
|
|
@ -3,8 +3,6 @@ import { RouterLink, RouterView } from 'vue-router'
|
|||
import HelloWorld from './components/HelloWorld.vue'
|
||||
import axios from 'axios';
|
||||
|
||||
axios.defaults.baseURL = import.meta.env.VITE_API_URL;
|
||||
|
||||
let fetchData = function () {
|
||||
axios.get("/python")
|
||||
.then(response => {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ import { createPinia } from 'pinia'
|
|||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import axios from 'axios';
|
||||
|
||||
axios.defaults.baseURL = import.meta.env.VITE_API_URL;
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue