Implement configuration fetching during runtime
[arvados-workbench2.git] / README.md
1 [comment]: # (Copyright © The Arvados Authors. All rights reserved.)
2 [comment]: # ()
3 [comment]: # (SPDX-License-Identifier: CC-BY-SA-3.0)
4
5 ## Arvados Workbench 2
6
7 ### Setup
8 <pre>
9 brew install yarn
10 yarn install
11 </pre>
12 Install [redux-devtools-extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd)
13
14 ### Start project
15 <code>yarn start</code>
16
17 ### Run tests
18 <pre>
19 yarn install
20 yarn test
21 </pre>
22
23 ### Production build
24 <pre>
25 yarn install
26 yarn build
27 </pre>
28
29 ### Build time configuration
30 You can customize project global variables using env variables. Default values are placed in the `.env` file.
31
32 Example:
33 ```
34 REACT_APP_ARVADOS_CONFIG_URL=config.json yarn build
35 ```
36
37 ### Run time configuration
38 The app will fetch runtime configuration when starting. By default it will try to fetch `/config.json`. You can customize this url using build time configuration.
39
40 Currently this configuration schema is supported:
41 ```
42 {
43     "API_HOST": "string"
44 }
45 ```
46
47 ### Licensing
48
49 Arvados is Free Software. See COPYING for information about Arvados Free
50 Software licenses.