Last active
June 15, 2018 19:52
-
-
Save vedovelli/789b727e4c5b5ece21782bcc72abb764 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
const http = axios.create({ | |
baseURL: 'http://localhost:8081' | |
}) | |
export default function install (Vue) { | |
Object.defineProperty(Vue.prototype, '$http', { | |
get () { | |
return http | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment