Skip to content

Commit

Permalink
Allow running the frontend on different hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
queicherius committed Sep 30, 2020
1 parent 879b349 commit 8dc4fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/sideEffects.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const url = process.env.NODE_ENV === 'production' ? '/api' : 'http://localhost:3123/api'
const url = process.env.NODE_ENV === 'production' ? '/api' : `http://${window.location.hostname}:3123/api`

export async function getLatestTest () {
const response = await window.fetch(url)
Expand Down

0 comments on commit 8dc4fb2

Please sign in to comment.