mirror of
https://github.com/kevin-DL/comedy-video-lib.git
synced 2026-01-20 14:35:06 +00:00
Installing MirageJS
- Added axios configuration - Added miragejs to mock api calls
This commit is contained in:
16
plugins/axios.js
Normal file
16
plugins/axios.js
Normal file
@@ -0,0 +1,16 @@
|
||||
export default function ({ $axios }, inject) {
|
||||
// Create a custom axios instance
|
||||
const api = $axios.create({
|
||||
headers: {
|
||||
common: {
|
||||
Accept: 'text/plain, */*',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
// Set baseURL to something different
|
||||
api.setBaseURL(process.env.baseApiUrl)
|
||||
|
||||
// Inject to context as $api
|
||||
inject('api', api)
|
||||
}
|
||||
Reference in New Issue
Block a user