Skip to content

Commit

Permalink
rename and use published npm
Browse files Browse the repository at this point in the history
  • Loading branch information
troggy committed Jun 16, 2018
1 parent e4183f3 commit 7ecc07e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -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=<etherscan_api_key> PORT=50336 node index.js
ETHERSCAN_API_KEY=<etherscan_api_key> PORT=50336 eth-node-healthcheck
```

for rinkeby network:
for rinkeby:
```
ETHERSCAN_API_KEY=<etherscan_api_key> PORT=50336 NETWORK=rinkeby node index.js
ETHERSCAN_API_KEY=<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

Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]:acebusters/geth-healthcheck.git",
"repository": "[email protected]:parsec-labs/eth-node-healthcheck.git",
"author": "Kosta Korenkov <[email protected]>",
"bin": {
"eth-node-healthcheck" : "./index.js"
},
"license": "MIT",
"dependencies": {}
}

0 comments on commit 7ecc07e

Please sign in to comment.