adding more details at the getting-started readme and changing react index to use .js config files

This commit is contained in:
biharck 2019-04-26 22:20:17 -03:00
parent 610aeb1b9a
commit b0d06baf29
3 changed files with 10 additions and 12 deletions

View File

@ -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
```` ````

View File

@ -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;
} }
} }

View File

@ -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';