-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0926fdc
commit f4d4145
Showing
10 changed files
with
53 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
VITE_API_HOST="http://localhost:3000" | ||
VITE_DATA_API_HOST="http://localhost:6379" | ||
VITE_POSTHOG_KEY="" | ||
VITE_POSTHOG_HOST="https://eu.posthog.com" | ||
VITE_DATA_API_HOST="http://localhost:4000" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const API_HOST: string = import.meta.env.VITE_API_HOST; | ||
const VITE_DATA_API_HOST: string = import.meta.env.VITE_DATA_API_HOST; | ||
|
||
export interface Config { | ||
apiHost: string; | ||
dataApiHost: string; | ||
} | ||
|
||
const configMap = new Map<string, Config>([ | ||
[ | ||
'0l.fyi', | ||
{ | ||
apiHost: 'https://api.0l.fyi', | ||
dataApiHost: 'https://data.0l.fyi', | ||
}, | ||
], | ||
[ | ||
'canary.0l.fyi', | ||
{ | ||
apiHost: 'https://canary.api.0l.fyi', | ||
dataApiHost: 'https://canary.data.0l.fyi', | ||
}, | ||
], | ||
[ | ||
'localhost', | ||
{ | ||
apiHost: API_HOST, | ||
dataApiHost: VITE_DATA_API_HOST, | ||
}, | ||
], | ||
]); | ||
|
||
export const config = configMap.get(window.location.hostname) ?? configMap.get('0l.fyi')!; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters