Skip to content

Instantly share code, notes, and snippets.

@vedovelli
Last active June 15, 2018 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vedovelli/789b727e4c5b5ece21782bcc72abb764 to your computer and use it in GitHub Desktop.
Save vedovelli/789b727e4c5b5ece21782bcc72abb764 to your computer and use it in GitHub Desktop.
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