Skip to content
Snippets Groups Projects
Commit 7bc86269 authored by roadscape's avatar roadscape
Browse files

update docs setup

parent c3cee5f4
No related branches found
No related tags found
No related merge requests found
# Ignore hive checkpoint files # client-only hive files
checkpoints/*.json.lst checkpoints/*.json.lst
hive.conf hive.conf
docs/hive docs/hive
......
...@@ -65,4 +65,4 @@ clean-pyc: ...@@ -65,4 +65,4 @@ clean-pyc:
find . -name '*~' -exec rm -f {} + find . -name '*~' -exec rm -f {} +
install: clean install: clean
pip install -e . pip3 install -e .
...@@ -7,11 +7,13 @@ Hive is a "consensus interpretation" layer for the Steem blockchain, maintaining ...@@ -7,11 +7,13 @@ Hive is a "consensus interpretation" layer for the Steem blockchain, maintaining
## Development Environment ## Development Environment
``` ```bash
$ brew install python3 postgresql $ brew install python3 postgresql
$ createdb hive $ createdb hive
$ export DATABASE_URL=postgresql://user:pass@localhost:5432/hive $ export DATABASE_URL=postgresql://user:pass@localhost:5432/hive
```
```bash
$ git clone https://github.com/steemit/hivemind.git $ git clone https://github.com/steemit/hivemind.git
$ cd hivemind $ cd hivemind
$ pip3 install -e . $ pip3 install -e .
...@@ -19,22 +21,22 @@ $ pip3 install -e . ...@@ -19,22 +21,22 @@ $ pip3 install -e .
Start the indexer: Start the indexer:
``` ```bash
$ hive sync $ hive sync
``` ```
``` ```bash
$ hive status $ hive status
{'db_head_block': 19930833, 'db_head_time': '2018-02-16 21:37:36', 'db_head_age': 10} {'db_head_block': 19930833, 'db_head_time': '2018-02-16 21:37:36', 'db_head_age': 10}
``` ```
Start the server: Start the server:
``` ```bash
$ hive server $ hive server
``` ```
``` ```bash
$ curl --data '{"jsonrpc":"2.0","id":0,"method":"db_head_state"}' http://localhost:8080 $ curl --data '{"jsonrpc":"2.0","id":0,"method":"db_head_state"}' http://localhost:8080
{"jsonrpc": "2.0", "result": {"db_head_block": 19930795, "db_head_time": "2018-02-16 21:35:42", "db_head_age": 10}, "id": 0} {"jsonrpc": "2.0", "result": {"db_head_block": 19930795, "db_head_time": "2018-02-16 21:35:42", "db_head_age": 10}, "id": 0}
``` ```
...@@ -197,12 +199,10 @@ The easiest way to avoid forks is to only index up to the last irreversible bloc ...@@ -197,12 +199,10 @@ The easiest way to avoid forks is to only index up to the last irreversible bloc
## Documentation [WIP] ## Documentation
``` ```bash
$ pip install pdoc $ make docs && open docs/hive/index.html
$ make docs
$ open docs/hive/index.html
``` ```
Note: Hive currently does not support MySQL; take a look at the old `mysql2` branch for insight into what would need to be changed. Note: Hive currently does not support MySQL; take a look at the old `mysql2` branch for insight into what would need to be changed.
......
...@@ -34,6 +34,7 @@ setup( ...@@ -34,6 +34,7 @@ setup(
'psycopg2', 'psycopg2',
'aiocache', 'aiocache',
'configargparse', 'configargparse',
'pdoc',
], ],
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment