Update readme to run server
This commit is contained in:
parent
864e124ebc
commit
b55cc1989c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
.idea/
|
||||
leveldb-ethdb-rpc
|
||||
environments/config.toml
|
24
README.md
24
README.md
@ -1,2 +1,26 @@
|
||||
# leveldb-ethdb-rpc
|
||||
Thin RPC wrapper around LevelDB to expose data remotely
|
||||
|
||||
## Setup
|
||||
|
||||
Run the following
|
||||
|
||||
```bash
|
||||
make build
|
||||
```
|
||||
|
||||
Create a `config.toml` file from [example.toml](./environments/example.toml) file.
|
||||
|
||||
Update the config for path to geth leveldb and geth ancient database
|
||||
|
||||
```toml
|
||||
[leveldb]
|
||||
path = "/path/to/eth/data/geth/chaindata" # $LEVELDB_PATH
|
||||
ancient = "/path/to/eth/data/geth/chaindata/ancient" # $LEVELDB_ANCIENT_PATH
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
After building the binary, run as
|
||||
|
||||
`./leveldb-ethdb-rpc serve --config ./environments/config.toml`
|
||||
|
@ -79,6 +79,11 @@ func logLevel() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
cobra.OnInitialize(initConfig)
|
||||
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file location")
|
||||
}
|
||||
|
||||
// initConfig reads in config file and ENV variables if set.
|
||||
func initConfig() {
|
||||
if cfgFile != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user