gancio-upstream/plugins/axios.js

9 lines
236 B
JavaScript
Raw Normal View History

2019-09-11 19:12:24 +02:00
export default function ({ $axios, store }) {
2019-06-25 01:05:38 +02:00
if (process.client) {
$axios.setBaseURL(window.location.origin + '/api')
} else {
const config = require('../server/config')
$axios.setBaseURL(config.baseurl + '/api')
}
2019-09-11 19:12:24 +02:00
}