Add axios api
This commit is contained in:
parent
5b079999bb
commit
c95b335e3c
9
web/src/api/index.js
Normal file
9
web/src/api/index.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
|
export default axios.create({
|
||||||
|
baseURL: 'http://localhost:8081',
|
||||||
|
timeout: 4000,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
@ -2,6 +2,8 @@ import Vue from 'vue'
|
|||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
|
import Api from './api'
|
||||||
|
|
||||||
import BootstrapVue from 'bootstrap-vue'
|
import BootstrapVue from 'bootstrap-vue'
|
||||||
|
|
||||||
import 'bootswatch/dist/minty/bootstrap.css'
|
import 'bootswatch/dist/minty/bootstrap.css'
|
||||||
@ -15,5 +17,6 @@ Vue.config.productionTip = false
|
|||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
|
Api,
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
Loading…
x
Reference in New Issue
Block a user