Skip to content

Commit

Permalink
docs: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
iczc committed Aug 19, 2021
1 parent 738de77 commit 9d8e754
Showing 1 changed file with 44 additions and 3 deletions.
47 changes: 44 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,48 @@
# eth-faucet
The faucet is a web application with the goal of distributing small amounts of Ether in private and test networks.

## Quick Start
## Get started
### Prerequisites

* Go (1.16 or later)
* Node.js

### Build

1. Clone the repository
```bash
git clone https://github.com/chainflag/eth-faucet.git
```

2. Bundle web using rollup
```bash
cd web && npm install
npm run build
```
_For more details, please refer to the [web readme](https://github.com/chainflag/eth-faucet/blob/main/web/README.md)_

3. Build binary application
```bash
docker build -t eth-faucet .
docker run -d -p 8080:8080 -v `pwd`/config.yml:/app/config.yml eth-faucet
cd ..
go build -o eth-faucet main.go
```

## Usage
First create config file `config.yml` based on the [example](https://github.com/chainflag/eth-faucet/blob/main/config.sample.yml)
* `provider` Ethereum json rpc endpoint
* `payout` Number of Ethers to transfer per request
* `queuecap` Maximum transactions waiting to be sent
* `wallet` Funder account specified via hex private key or keystore. Faucet will use private key first if it is not empty.

then start the faucet server
```
./eth-faucet -port 8080
```

or run faucet using docker without the compiled binary
```bash
docker run -d -p 8080:8080 -v `pwd`/config.yml:/app/config.yml chainflag/eth-faucet
```

## License
This project is licensed under the MIT License

0 comments on commit 9d8e754

Please sign in to comment.