0.0.3 • Published 8 years ago
ethminer-http-api v0.0.3
ethminer-http-api
A simple http api for ethminer
Install
npm i -g ethminer-http-apiUsage
PORT=8888 ETHMINER_PORT=3000 ETHMINER_HOST=localhost ehtminer-http-serverThe http server will listen on PORT and communicate with ethminer at ETHMINER_HOST on ETHMINER_PORT.
Note that ethminer must be started with the --api-port option. (ethminer --api-port 3000 [...])
Exemples
- Ethminer docker and ethminer-http-api docker
# Create a network
docker network create --driver=bridge -o "com.docker.network.bridge.enable_icc"="true" miners
# Start ethminer
nvidia-docker run --rm --name=miner1 --network=miners -p "3000:3000" -d anthonytatowicz/eth-cuda-miner -S eu1.ethermine.org:4444 --api-port 3000 -FS us1.ethermine.org:4444 -O 0x27b0aac47a62d63e759c8271e0370cdc021843bf.github
# Start the api
docker run --network=miners -e ETHMINER_HOST=miner1 -e ETHMINER_PORT=3000 -p "8888:8888" -d cgarnier/ethminer-http-apiAccess to the api on http://localhost:8888
Http endpoints
GET /stats- display the miner statsPOST /restart- restart the miner