Shift default config to own file
This commit is contained in:
parent
0d5ac9ce4c
commit
6177a02f18
14
.env.development
Normal file
14
.env.development
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
##
|
||||||
|
# DEVELOPMENT: Default
|
||||||
|
#
|
||||||
|
# We're using this to set variables for our local development.
|
||||||
|
# Please feel free to delete or modify this file for your own setup.
|
||||||
|
# Be careful not to commit anything sensitive to source control.
|
||||||
|
#
|
||||||
|
|
||||||
|
PUBLIC_URL=/
|
||||||
|
|
||||||
|
#
|
||||||
|
# Most vars require REACT_APP_* naming
|
||||||
|
#
|
||||||
|
REACT_APP_CONFIG=config/default.js
|
||||||
@ -6,4 +6,9 @@
|
|||||||
# environment. Be careful not to commit anything sensitive to source control.
|
# environment. Be careful not to commit anything sensitive to source control.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
PUBLIC_URL=/demo
|
||||||
|
|
||||||
|
#
|
||||||
|
# Most vars require REACT_APP_* naming
|
||||||
|
#
|
||||||
REACT_APP_CONFIG=config/netlify.js
|
REACT_APP_CONFIG=config/netlify.js
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
"dev:debug": "cross-env PORT=5000 react-scripts start",
|
"dev:debug": "cross-env PORT=5000 react-scripts start",
|
||||||
"build:package": "yarn run preBuild && node --max-old-space-size=4096 node_modules/rollup/bin/rollup -c",
|
"build:package": "yarn run preBuild && node --max-old-space-size=4096 node_modules/rollup/bin/rollup -c",
|
||||||
"build:web": "yarn run preBuild && react-scripts build",
|
"build:web": "yarn run preBuild && react-scripts build",
|
||||||
"build:web:ci": "yarn run preBuild && cross-env PUBLIC_URL=/demo react-scripts --max_old_space_size=4096 build && cpx 'build/**/*' docs/latest/_book/demo --verbose",
|
"build:web:ci": "yarn run preBuild && react-scripts --max_old_space_size=4096 build && cpx 'build/**/*' docs/latest/_book/demo --verbose",
|
||||||
"lint": "eslint -c .eslintrc --fix src && prettier --single-quote --write src/**/*.{js,jsx,json,css}",
|
"lint": "eslint -c .eslintrc --fix src && prettier --single-quote --write src/**/*.{js,jsx,json,css}",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:ci": "jest --ci --runInBand --collectCoverage --reporters=default --reporters=jest-junit && codecov",
|
"test:ci": "jest --ci --runInBand --collectCoverage --reporters=default --reporters=jest-junit && codecov",
|
||||||
|
|||||||
20
public/config/default.js
Normal file
20
public/config/default.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
window.config = {
|
||||||
|
routerBasename: '/',
|
||||||
|
rootUrl: 'http://localhost:5000',
|
||||||
|
servers: {
|
||||||
|
dicomWeb: [
|
||||||
|
{
|
||||||
|
name: 'DCM4CHEE',
|
||||||
|
wadoUriRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado',
|
||||||
|
qidoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
|
||||||
|
wadoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
|
||||||
|
qidoSupportsIncludeField: true,
|
||||||
|
imageRendering: 'wadors',
|
||||||
|
thumbnailRendering: 'wadors',
|
||||||
|
requestOptions: {
|
||||||
|
requestFromBrowser: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
22
src/index.js
22
src/index.js
@ -8,27 +8,7 @@ import ReactDOM from 'react-dom'
|
|||||||
|
|
||||||
export { App }
|
export { App }
|
||||||
|
|
||||||
const applicationProps = window.config || {
|
const applicationProps = window.config
|
||||||
routerBasename: '/',
|
|
||||||
rootUrl: 'http://localhost:5000',
|
|
||||||
servers: {
|
|
||||||
dicomWeb: [
|
|
||||||
{
|
|
||||||
name: 'DCM4CHEE',
|
|
||||||
wadoUriRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado',
|
|
||||||
qidoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
|
|
||||||
wadoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
|
|
||||||
qidoSupportsIncludeField: true,
|
|
||||||
imageRendering: 'wadors',
|
|
||||||
thumbnailRendering: 'wadors',
|
|
||||||
requestOptions: {
|
|
||||||
requestFromBrowser: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
const app = React.createElement(App, applicationProps, null)
|
const app = React.createElement(App, applicationProps, null)
|
||||||
|
|
||||||
ReactDOM.render(app, document.getElementById('root'))
|
ReactDOM.render(app, document.getElementById('root'))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user