forked from oist/optinist
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #467 from arayabrain/feature/improve-api-error-han…
…dling Improve API Error Handling, etc
- Loading branch information
Showing
11 changed files
with
228 additions
and
73 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
const HOST = | ||
process.env.REACT_APP_SERVER_HOST ?? window.location.hostname ?? "localhost" | ||
const PORT = process.env.REACT_APP_SERVER_PORT ?? window.location.port ?? 8000 | ||
process.env.REACT_APP_SERVER_HOST || window.location.hostname || "localhost" | ||
const PROTO = | ||
process.env.REACT_APP_SERVER_PROTO ?? | ||
window.location.protocol.replace(":", "") ?? | ||
process.env.REACT_APP_SERVER_PROTO || | ||
window.location.protocol.replace(":", "") || | ||
"http" | ||
const PORT = | ||
process.env.REACT_APP_SERVER_PORT || | ||
window.location.port || | ||
(PROTO == "https" ? 443 : 8000) | ||
|
||
export const BASE_URL = | ||
PORT == null ? `${PROTO}://${HOST}` : `${PROTO}://${HOST}:${PORT}` |
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
Oops, something went wrong.