Graphite-Docs / graphite

Encrypted, secure, user-owned productivity suite
https://graphitedocs.com
GNU General Public License v3.0
583 stars 90 forks source link

[Don't Merge] - Set Global Axios defaults #171

Closed kkomaz closed 4 years ago

kkomaz commented 4 years ago
// src/index.js
const setAxiosHeaders = () => {
  // Default
  axios.defaults.baseURL = process.env.NODE_ENV === 'development' ? process.env.REACT_APP_API_URL_LOCAL : process.env.REACT_APP_API_URL_SOCKET

  // Local w/ sockets (PRO)
  // axios.defaults.baseURL = process.env.REACT_APP_API_URL_SOCKET

  // Local w/o sockets (Normal)
  // axios.defaults.baseURL = process.env.REACT_APP_API_URL_LOCAL
}
kkomaz commented 4 years ago

Also @jehunter5811

We MIGHT need to add/update the environment variables in NETLIFY to the ones I defined in the PR. Adding this comment for Record Keeping

polluterofminds commented 4 years ago

@kkomaz there are no env variables in netlify. I reviewed this and everything works great. However, I found other bugs and fixed those. I included them in branch you created and merged your changes and mine into pre-release