Updates READMEs with the new config file apporach

This commit is contained in:
Sergi Delgado Segura
2020-03-23 17:12:23 +01:00
parent d21e947e05
commit d2fbcf61e3
4 changed files with 112 additions and 41 deletions

View File

@@ -5,14 +5,14 @@
There are two ways of running `teos`: running it as a module or adding the library to the `PYTHONPATH` env variable.
## Running `teos` as a Module
The easiest way to run `teos` is as a module. To do so you need to use `python -m`. From the teos parent directory run:
The **easiest** way to run `teos` is as a module. To do so you need to use `python -m`. From the teos parent directory run:
python -m teos.teosd
python -m teos.teosd -h
Notice that if you run `teos` as a module, you'll need to replace all the calls from `python teosd.py` to `python -m teos.teosd`
## Modifying `PYTHONPATH`
Alternatively, you can add `teos` to your `PYTHONPATH`. You can do so by running:
**Alternatively**, you can add `teos` to your `PYTHONPATH` by running:
export PYTHONPATH=$PYTHONPATH:<absolute_path_to_teos_parent>
@@ -24,7 +24,14 @@ You should also include the command in your `.bashrc` to avoid having to run it
echo 'export PYTHONPATH=$PYTHONPATH:<absolute_path_to_teos_parent>' >> ~/.bashrc
## Modify Configuration Parameters
If you'd like to modify some of the configuration defaults (such as the user directory, where the logs will be stored) you can do so in the config file located at:
Once the `PYTHONPATH` is set, you should be able to run `teos` straightaway. Try it by running:
<absolute_path_to_teos_parent>/teos/conf.py
cd <absolute_path_to_cli_parent>/teos
python teosd.py -h
## Modify Configuration Parameters
If you'd like to modify some of the configuration defaults (such as the bitcoind rpcuser and password) you can do so in the config file located at:
<data_dir>/.teos/teos.conf
`<data_dir>` defaults to your home directory (`~`).