This is a visual interface for tracking proof-of-work ("mainnet") and proof-of-authority ("testnet") network status. It uses WebSockets to receive stats from running nodes and output them through an angular interface. It is the front-end implementation for ethstats-client.
- Demo: https://stats.goerli.net/
- Demo: https://kotti.goerli.net/
- node
- npm
Make sure you have node.js and npm installed.
Clone the repository and install the dependencies:
git clone https://github.com/goerli/ethstats-server
cd ethstats-server
sudo npm install -g --unsafe-perm=true --allow-root
npm install
sudo npm install -g grunt-cli
In order to build the static files you have to run grunt tasks which will generate dist directories containing the js and css files, fonts and images.
grunt poa
To build the static files for a network other than Ethereum copy and change src/js/defaultConfig.js and run the following command.
grunt poa --configPath="src/js/someOtherConfig.js"
Define some setting to environment file (.env)
PORT=3030
WS_SECRET=beta-net-stats-has-a-secret
Start a node process and pass the websocket secret to it.
WS_SECRET="asdf" npm start
Start a node process and pass the websocket secret to it.
pm2 start npm --name "beta-stats-server" -- start
Find the interface at http://localhost:3030
Same as above, just run the pow
build task in Grunt.
grunt pow
WS_SECRET="asdf" npm start
:-)
PM2 is a Production Process Manager for Node.js applications with a built-in Load Balancer.
Start and Daemonize any application:
$ pm2 start app.js
Load Balance 4 instances of api.js:
$ pm2 start api.js -i 4
Monitor in production:
$ pm2 monitor
Make pm2 auto-boot at server restart:
$ pm2 startup
To go further checkout:
http://pm2.io/