how it works
This commit is contained in:
parent
0909ab7c53
commit
33d06dba4e
@ -62,7 +62,7 @@ deployment experience.
|
|||||||
"Building", or creating, the files you will need is the same regardless of the
|
"Building", or creating, the files you will need is the same regardless of the
|
||||||
web host you choose. You can find detailed instructions on how to configure and
|
web host you choose. You can find detailed instructions on how to configure and
|
||||||
build the OHIF Viewer in our
|
build the OHIF Viewer in our
|
||||||
["Build for Production" guide](./build-for-production.md).
|
["Build for Production" guide](./recipes/build-for-production.md).
|
||||||
|
|
||||||
##### Part 2 - Host Your App
|
##### Part 2 - Host Your App
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@ _From .zip:_
|
|||||||
|
|
||||||
### Restore Dependencies & Build
|
### Restore Dependencies & Build
|
||||||
|
|
||||||
Open PowerShell, Terminal, or a Command Prompt, and navigate to the directory
|
Open your terminal, and navigate to the directory containing the source files.
|
||||||
containing the source files. Next run these commands:
|
Next run these commands:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// Restore dependencies
|
// Restore dependencies
|
||||||
@ -64,11 +64,37 @@ how to configure the project for your own imaging archive below.
|
|||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
...
|
> This step assumes you have an imaging archive. If you need assistance setting
|
||||||
|
> one up, check out the [`Data` section](./../index.md#data) of our Deployment
|
||||||
|
> Guide, or `Getting Started`'s
|
||||||
|
> ["Set up a local DICOM server"](./../../essentials/getting-started.md#set-up-a-local-dicom-server),
|
||||||
|
> or a deployment recipe that contains an open source Image Archive
|
||||||
|
|
||||||
- env vars
|
#### How It Works
|
||||||
- `REACT_APP_*`
|
|
||||||
- config file(s)
|
The configuration for our project is in the `/public/config` directory. Our
|
||||||
|
build process knows which configuration file to use based on the
|
||||||
|
`REACT_APP_CONFIG` environment variable. By default, its value is
|
||||||
|
[`default.js`](https://github.com/OHIF/Viewers/blob/react/public/config/default.js).
|
||||||
|
When we build, the `%REACT_APP_CONFIG%` value in
|
||||||
|
our[`/public/index.html`](https://github.com/OHIF/Viewers/blob/react/public/index.html#L12-L15)`file is substituted for the correct configuration file's name. Ultimately setting the`window.config`
|
||||||
|
equal to our configuration file's value.
|
||||||
|
|
||||||
|
- Modify its values directly
|
||||||
|
- Create a new config file, and set the `REACT_APP_CONFIG` environement variable
|
||||||
|
-
|
||||||
|
|
||||||
|
The build process knows which file to use based on the `REACT_APP_CONFIG`
|
||||||
|
environment variable. You can set the value of this environment variable a few
|
||||||
|
different ways:
|
||||||
|
|
||||||
|
- [Add a temporary environment variable in your shell](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-temporary-environment-variables-in-your-shell)
|
||||||
|
- [Add environment specific variables in `.env` file(s)](https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-development-environment-variables-in-env)
|
||||||
|
-
|
||||||
|
|
||||||
|
* env vars
|
||||||
|
* `REACT_APP_*`
|
||||||
|
* config file(s)
|
||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user