-
Notifications
You must be signed in to change notification settings - Fork 90
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
Showing
4 changed files
with
87 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,50 @@ | ||
# when debugging locally, create a file ".env.local" next to this file | ||
# and set this variable to the full base URL of your API endpoint. | ||
# You can set this variable to just the API path base if your API uses | ||
# he same hostname and scheme as the webserver serving this app (which is | ||
# likely "http://localhost:3000" when debugging locally). The app will set | ||
# basic CORS headers when NODE_ENV == "development" or "test". | ||
# When debugging locally, create a file ".env.local" next to this file | ||
# containing: | ||
|
||
REACT_APP_API_BASE_URL=/path/to/api/endpoint | ||
|
||
# ... if your API is served from the same origin as this webapp. For example, | ||
# if this web app is available at "https://www.myapp.mil/" and the API is | ||
# available at "https://www.myapp.mil/api" then you'd set: | ||
|
||
REACT_APP_API_BASE_URL=/api | ||
|
||
# If your API is served from a different origin (e.g. if you're debugging | ||
# locally at http://localhost:3000) than your API (say it's still | ||
# "https://www.myapp.mil/api") then set: | ||
|
||
REACT_APP_API_BASE_URL=https://www.myapp.mil/api | ||
|
||
# This will also work if the web app and API are served from the same origin. | ||
# The app will set basic CORS headers when NODE_ENV == "development" or "test". | ||
# More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
# | ||
#=============================================================================# | ||
# Note that NOT setting REACT_APP_API_BASE_URL - either in the environment or # | ||
# in another .env.* file - will result in a build error. # | ||
#=============================================================================# | ||
# | ||
# More info: | ||
# - https://create-react-app.dev/docs/advanced-configuration/ | ||
# - https://create-react-app.dev/docs/adding-custom-environment-variables/ | ||
# - https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
# The .env.* files override one another like so (highest > lowest priority): | ||
# > when NODE_ENV === "development": | ||
# - (variables from environment) | ||
# - .env.development.local | ||
# - .env.development | ||
# - .env.local | ||
# - .env | ||
# > when NODE_ENV === "production": | ||
# - (variables from environment) | ||
# - .env.production.local | ||
# - .env.production | ||
# - .env.local | ||
# - .env | ||
# > when NODE_ENV === "test": (omits .env.local) | ||
# - (variables from environment) | ||
# - .env.test.local | ||
# - .env.test | ||
# - .env | ||
# | ||
# The following configuration simply picks up the base url from an environment | ||
# variable. | ||
# More info: | ||
# - https://create-react-app.dev/docs/adding-custom-environment-variables/#what-other-env-files-can-be-used | ||
# - https://create-react-app.dev/docs/advanced-configuration | ||
# | ||
REACT_APP_API_BASE_URL=${REACT_APP_API_BASE_URL} | ||
REACT_APP_API_BASE_URL=OverrideMeOrThereWillBeABuildError |
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