kalm 33a79af5a3 explorer/site: add support for explorer nodes running on multiple networks (localnet, testnet, mainnet) 1 rok temu
..
blueprints f852967618 explorer: move explorer source code from research to bin/explorer for project releases 1 rok temu
static f852967618 explorer: move explorer source code from research to bin/explorer for project releases 1 rok temu
templates f852967618 explorer: move explorer source code from research to bin/explorer for project releases 1 rok temu
.gitignore f852967618 explorer: move explorer source code from research to bin/explorer for project releases 1 rok temu
README.md f852967618 explorer: move explorer source code from research to bin/explorer for project releases 1 rok temu
app.py 18dc05283d explorer/site: Enhance logging functionality and add application startup banner 1 rok temu
log.py 18dc05283d explorer/site: Enhance logging functionality and add application startup banner 1 rok temu
requirements.txt 1a684c6702 explorer/site: Add support for TOML-based configuration 1 rok temu
rpc.py 7eaab11f76 explorer/site: update configuration keys to lowercase 1 rok temu
site_config.toml 33a79af5a3 explorer/site: add support for explorer nodes running on multiple networks (localnet, testnet, mainnet) 1 rok temu

README.md

Blockchain explorer web front-end

This is a very basic python based web front-end, based on flask, to serve static pages with blockchain data.

Usage

We fist have to run 2 other daemons, to retrieve data from. Note: all paths are from repo root.

First we start a darkfid localnet:

% cd contrib/localnet/darkfid-single-node/
% ./tmux_sessions.sh

It is advised to shutdown the minerd daemon after couple of blocks, to not waste resources.

Update the explorerd configuration to the localnet darkfid JSON-RPC endpoint and start the daemon:

% cd bin/explorer/explorerd
% make install
% explorerd -c explored_config.toml  

Then we enter the site folder and we generate a new python virtual environment, source it and install required dependencies:

% cd bin/explorer/site
% python -m venv venv
% source venv/bin/activate
% pip install -r requirements.txt

To start the flask server, simply execute:

% python -m flask run

The web site will be available at 127.0.0.1:5000.