This is the backend service which runs along with ethermint and tracks the network status, fetches information through JSON-RPC and connects through WebSockets to eth-netstats to feed information.
- node & npm
To install all dependencies run following commands:
npm i
npm -g pm2
Configuration uses pm2
for running node. You will need to either create app.json
manually from app.json.example
or generate it using automated script.
For automated install run
node scripts/configure.js
it will generate ./app.json
You can copy app.json.example
to app.json
and modify it, only values that needs to be modified are under "env"
object.
"env":
{
"NODE_ENV" : "production", // tell the client we're in production environment
"RPC_HOST" : "localhost", // eth JSON-RPC host
"RPC_PORT" : "8545", // eth JSON-RPC port
"LISTENING_PORT" : "30303", // eth listening port (only used for display)
"INSTANCE_NAME" : "", // whatever you wish to name your node
"CONTACT_DETAILS" : "", // add your contact details here if you wish (email/skype)
"WS_SERVER" : "wss://ethermint-monitor-venus.herokuapp.com/", // path to eth-netstats WebSockets api server
"WS_SECRET" : "Check out our slack channel", // WebSockets api server secret used for login
"VERBOSITY" : 2 // Set the verbosity (0 = silent, 1 = error, warn, 2 = error, warn, info, success, 3 = all logs)
}
Run it using pm2:
pm2 start.app.json
pm2 stop app.json
pm2 delete app.json
pm2 status intelligence-api
pm2 show intelligence-api
pm2 logs intelligence-api