WelisonR/Trabalho-Individual-2020-2

View on GitHub
client/src/boot/axios.js

Summary

Maintainability
A
0 mins
Test Coverage
import Vue from "vue";
import axios from "axios";

let url = "http://localhost:8000";
if (process.env.NODE_ENV == "production") {
  url = "https://glacial-harbor-86827.herokuapp.com";
}

const api = axios.create({
  baseURL: url
});

Vue.prototype.$axios = api;

export { api };