Skip to content

Commit

Permalink
heroku quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alxford45 committed Nov 29, 2020
1 parent a5ac230 commit 04ec48e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/src/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ If serve static dev -> host = localhost:3000
If concurrent dev -> host = localhost:5000
If production -> host = 'https://lsu-it-support-demo.herokuapp.com/'
*/
const PORT = process.env.PORT || 5000;
const HOST = process.env.HOST || `localhost:${PORT}`
// const PORT = process.env.PORT || 5000;
// const HOST = process.env.HOST || `localhost:${PORT}`

/* Heroku env vars not working :( */
const LAZY = 'https://lsu-it-support-demo.herokuapp.com/api/'
export default axios.create({
baseURL: `http://${HOST}/api/`,
// baseURL: `http://${HOST}/api/`,
baseURL: LAZY
});

0 comments on commit 04ec48e

Please sign in to comment.