diff --git a/README.md b/README.md index f07be82..6ffc55c 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,30 @@ -# geth-healthcheck +# eth-node-healthcheck -Little http node.js server to run along the ethereum node. Node needs to have JSONRPC enabled. Returns **503 Service Unavailable** if the last block number on the local node is off by 4 or more blocks from the last block nubmer from Etherscan. Otherwise returns **200 OK** +Little http node.js server to run along the ethereum node. Node needs to have JSONRPC enabled. Returns **503 Service Unavailable** if the last block number on the local node is off by 3 or more blocks from the last block nubmer from Etherscan. Otherwise returns **200 OK**. + +Supported networks: +- mainnet +- rinkeby ## Installation -1. Install node.js if needed: -``` -curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - -sudo apt-get install -y nodejs -``` -2. Get the app: ``` -wget https://raw.githubusercontent.com/acebusters/geth-healthcheck/master/index.js +npm install -g eth-node-healthcheck ``` -3. Run the app: +## Run + +for mainnet: ``` -ETHERSCAN_API_KEY= PORT=50336 node index.js +ETHERSCAN_API_KEY= PORT=50336 eth-node-healthcheck ``` -for rinkeby network: +for rinkeby: ``` -ETHERSCAN_API_KEY= PORT=50336 NETWORK=rinkeby node index.js +ETHERSCAN_API_KEY= PORT=50336 NETWORK=rinkeby eth-node-healthcheck ``` -Make sure it is detached from the terminal. Make sure the port is open for incoming connections. +Make sure the process is detached from the terminal. Make sure the port is open for incoming connections. ## License diff --git a/package.json b/package.json index 6886153..2bd95d3 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,13 @@ { - "name": "geth-healthcheck", + "name": "eth-node-healthcheck", "version": "1.0.0", - "description": "Simple http server to monitor if geth is in sync with blockchain", + "description": "Simple http server to monitor if Geth/Parity is in sync with the blockchain", "main": "index.js", - "repository": "git@github.com:acebusters/geth-healthcheck.git", + "repository": "git@github.com:parsec-labs/eth-node-healthcheck.git", "author": "Kosta Korenkov ", + "bin": { + "eth-node-healthcheck" : "./index.js" + }, "license": "MIT", "dependencies": {} }