mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
update docs
This commit is contained in:
parent
fd0506a37e
commit
60335ba02e
22
README.md
22
README.md
@ -30,7 +30,7 @@ If you're a developer and want to contribute to, or want to utilize this marketp
|
|||||||
- [⛵️ Environment Variables](#️-environment-variables)
|
- [⛵️ Environment Variables](#️-environment-variables)
|
||||||
- [Client](#client)
|
- [Client](#client)
|
||||||
- [Server](#server)
|
- [Server](#server)
|
||||||
- [Network & Endpoint Switches](#network-amp-endpoint-switches)
|
- [Network & Endpoint Switches](#network--endpoint-switches)
|
||||||
- [Feature Switches](#feature-switches)
|
- [Feature Switches](#feature-switches)
|
||||||
- [More Settings](#more-settings)
|
- [More Settings](#more-settings)
|
||||||
- [👩🔬 Testing](#-testing)
|
- [👩🔬 Testing](#-testing)
|
||||||
@ -83,7 +83,12 @@ cd barge
|
|||||||
./start_ocean.sh --no-commons
|
./start_ocean.sh --no-commons
|
||||||
```
|
```
|
||||||
|
|
||||||
Then set [environment variables](#️-environment-variables) to use those local connections.
|
Then set the [`REACT_APP_OCEAN_NETWORK` environment variable](#️-environment-variables) to `spree` to use those local connections:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# in client/.env
|
||||||
|
REACT_APP_OCEAN_NETWORK=spree
|
||||||
|
```
|
||||||
|
|
||||||
Finally, you need to copy the generated contract artifacts out of the Docker container. To do this, execute this script in another terminal:
|
Finally, you need to copy the generated contract artifacts out of the Docker container. To do this, execute this script in another terminal:
|
||||||
|
|
||||||
@ -116,13 +121,13 @@ The `./client/src/config.ts` file is setup to prioritize environment variables f
|
|||||||
|
|
||||||
By setting environment variables, you can easily switch between Ocean networks the commons client connects to, without directly modifying `./client/src/config.ts`. This is helpful e.g. for local development so you don't accidentially commit changes to the config file.
|
By setting environment variables, you can easily switch between Ocean networks the commons client connects to, without directly modifying `./client/src/config.ts`. This is helpful e.g. for local development so you don't accidentially commit changes to the config file.
|
||||||
|
|
||||||
For local development, you can use a `.env.local` file. There's an example file with the most common network configurations preconfigured:
|
For local development, you can use a `.env` file. There's an example file with the most common network configurations preconfigured:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp client/.env.local.example client/.env.local
|
cp client/.env.example client/.env
|
||||||
|
|
||||||
# uncomment the config you need
|
# uncomment the config you need
|
||||||
vi client/.env.local
|
vi client/.env
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Server
|
#### Server
|
||||||
@ -153,6 +158,13 @@ For more control, you can overwrite individual endpoints in addition to the abov
|
|||||||
- `REACT_APP_SECRET_STORE_URI`
|
- `REACT_APP_SECRET_STORE_URI`
|
||||||
- `REACT_APP_FAUCET_URI`
|
- `REACT_APP_FAUCET_URI`
|
||||||
|
|
||||||
|
A common use case for that is to switch between different Aquarius instances to get a different asset catalogue. In that case, you would use `REACT_APP_OCEAN_NETWORK` to select the network, but then overwrite only `REACT_APP_AQUARIUS_URI`, e.g.:
|
||||||
|
|
||||||
|
```
|
||||||
|
REACT_APP_OCEAN_NETWORK=pacific
|
||||||
|
REACT_APP_AQUARIUS_URI=https://aquarius.test.oceanprotocol.com
|
||||||
|
```
|
||||||
|
|
||||||
#### Feature Switches
|
#### Feature Switches
|
||||||
|
|
||||||
Beside configuring the network endpopints, the client allows to activate some features with environment variables in `client/.env.local`:
|
Beside configuring the network endpopints, the client allows to activate some features with environment variables in `client/.env.local`:
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
.env.local
|
|
||||||
.env
|
.env
|
||||||
build
|
build
|
||||||
coverage
|
coverage
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# AUTO NETWORK CONNECTIONS
|
# AUTO NETWORK CONNECTIONS
|
||||||
# ------------------------
|
# ------------------------
|
||||||
# This env var is a shortcut for a set Ocean network component endpoints.
|
# This env var is a shortcut for a set of Ocean network component endpoints.
|
||||||
#
|
#
|
||||||
# Possible values: pacific, nile, duero, spree
|
# Possible values: pacific, nile, duero, spree
|
||||||
REACT_APP_OCEAN_NETWORK=pacific
|
REACT_APP_OCEAN_NETWORK=pacific
|
Loading…
Reference in New Issue
Block a user