Answers for "axios default baseurl conditional environment"

0

axios default baseurl conditional environment

import axios from 'axios'
window.axios.defaults.headers.common = {'X-Requested-With': 'XMLHttpRequest'}
window.axios.defaults.baseURL = (process.env.NODE_ENV !== 'production') ? 'http://localhost:9000/api/' : ''
Posted by: Guest on May-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language