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`
````bash
cd Packages-react/ohif-viewer
npm install
yarn install
````
3. Run the application
````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.
@ -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
````bash
cd Packages-react/ohif-viewer
yarn install
````
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
export REACT_APP_CONFIG=$(cat ../../config-react/local_orthanc.json)
export REACT_APP_CONFIG=$(cat ./config/local_orthanc.js)
yarn start
````

View File

@ -175,14 +175,14 @@ props.whiteLabelling = {
//
// If you change the JSON config, you need to re-run the command!
const configString = process.env && process.env && process.env.REACT_APP_CONFIG;
if (configString) {
const configJSON = JSON.parse(configString);
if (configJSON.servers) {
props.servers = configJSON.servers;
if (configString.servers) {
props.servers = configString.servers;
}
if (configJSON.oidc) {
props.oidc = configJSON.oidc;
if (configString.oidc) {
props.oidc = configString.oidc;
}
}

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import qs from 'query-string';
import qs from 'querystring';
import Viewer from '../connectedComponents/Viewer';
import OHIF from 'ohif-core';