# ethminer-http-api

> > A simple http api for ethminer

Latest version **0.0.3** (published 2018-01-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install ethminer-http-api
pnpm add ethminer-http-api
yarn add ethminer-http-api
bun add ethminer-http-api
```

Provides the command `ethminer-api-server`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2018-01-21 |
| First published | 2018-01-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | cgarnier |

## Links

- npm: https://www.npmjs.com/package/ethminer-http-api
- Repository: https://github.com/cgarnier/ethminer-http-api
- Homepage: https://github.com/cgarnier/ethminer-http-api#readme
- Issues: https://github.com/cgarnier/ethminer-http-api/issues
- npm.io page: https://npm.io/package/ethminer-http-api

## Dependencies (1)

- [express](https://npm.io/package/express.md) ^4.16.2

## Recent versions

- 0.0.3 (latest) — 2018-01-21
- 0.0.2 — 2018-01-21
- 0.0.1 — 2018-01-21

## README

# ethminer-http-api

> A simple http api for ethminer

## Install

```bash
npm i -g ethminer-http-api
```

## Usage

```bash
PORT=8888 ETHMINER_PORT=3000 ETHMINER_HOST=localhost ehtminer-http-server
```
The 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
```bash
# 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-api
```

Access to the api on `http://localhost:8888`

### Http endpoints

 * `GET /stats` - display the miner stats
 * `POST /restart` - restart the miner

---
_Source: https://npm.io/package/ethminer-http-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
