adding more details at the getting-started readme and changing react index to use .js config files
This commit is contained in:
parent
610aeb1b9a
commit
b0d06baf29
@ -19,14 +19,13 @@ You can either spin up locally or run with Docker.
|
|||||||
2. Open a new terminal tab, go under `ohif-viewer` directory and install all dependency packages via `yarn`
|
2. Open a new terminal tab, go under `ohif-viewer` directory and install all dependency packages via `yarn`
|
||||||
|
|
||||||
````bash
|
````bash
|
||||||
cd Packages-react/ohif-viewer
|
yarn install
|
||||||
npm install
|
|
||||||
````
|
````
|
||||||
|
|
||||||
3. Run the application
|
3. Run the application
|
||||||
|
|
||||||
````bash
|
````bash
|
||||||
yar start
|
yarn start
|
||||||
````
|
````
|
||||||
|
|
||||||
Note: This will connect to our public DICOMWeb server so you can verify your installation. Follow the next section to connect to your own local or remote DICOMWeb server.
|
Note: This will connect to our public DICOMWeb server so you can verify your installation. Follow the next section to connect to your own local or remote DICOMWeb server.
|
||||||
@ -121,15 +120,14 @@ Once you have Orthanc running with docker either with temporary data storage or
|
|||||||
3. After you load the data, open a new terminal tab in the `ohif-viewer` directory and install all dependency packages via NPM
|
3. After you load the data, open a new terminal tab in the `ohif-viewer` directory and install all dependency packages via NPM
|
||||||
|
|
||||||
````bash
|
````bash
|
||||||
cd Packages-react/ohif-viewer
|
|
||||||
yarn install
|
yarn install
|
||||||
````
|
````
|
||||||
|
|
||||||
3. Run the application using one of the available configuration files.
|
3. Run the application using one of the available configuration files.
|
||||||
**the following command assumes you are under `Packages-react/ohif-viewer` folder**
|
**the following command assumes you are under the `root` folder**
|
||||||
|
|
||||||
````bash
|
````bash
|
||||||
export REACT_APP_CONFIG=$(cat ../../config-react/local_orthanc.json)
|
export REACT_APP_CONFIG=$(cat ./config/local_orthanc.js)
|
||||||
yarn start
|
yarn start
|
||||||
````
|
````
|
||||||
|
|
||||||
|
|||||||
10
src/index.js
10
src/index.js
@ -175,14 +175,14 @@ props.whiteLabelling = {
|
|||||||
//
|
//
|
||||||
// If you change the JSON config, you need to re-run the command!
|
// If you change the JSON config, you need to re-run the command!
|
||||||
const configString = process.env && process.env && process.env.REACT_APP_CONFIG;
|
const configString = process.env && process.env && process.env.REACT_APP_CONFIG;
|
||||||
|
|
||||||
if (configString) {
|
if (configString) {
|
||||||
const configJSON = JSON.parse(configString);
|
if (configString.servers) {
|
||||||
if (configJSON.servers) {
|
props.servers = configString.servers;
|
||||||
props.servers = configJSON.servers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configJSON.oidc) {
|
if (configString.oidc) {
|
||||||
props.oidc = configJSON.oidc;
|
props.oidc = configString.oidc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import qs from 'query-string';
|
import qs from 'querystring';
|
||||||
import Viewer from '../connectedComponents/Viewer';
|
import Viewer from '../connectedComponents/Viewer';
|
||||||
import OHIF from 'ohif-core';
|
import OHIF from 'ohif-core';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user