README.md

This commit is contained in:
sc0Vu 2018-02-08 17:01:18 +08:00
parent b21a0227c1
commit 6f21731769

View File

@ -208,6 +208,42 @@ To run examples, you need to run ethereum blockchain local (testrpc).
If you are using docker as development machain, you can try [ethdock](https://github.com/sc0vu/ethdock) to run local ethereum blockchain, just simply run `docker-compose up -d testrpc` and expose the `8545` port. If you are using docker as development machain, you can try [ethdock](https://github.com/sc0vu/ethdock) to run local ethereum blockchain, just simply run `docker-compose up -d testrpc` and expose the `8545` port.
# Develop
### Local php cli installed
1. Clone the repo and install packages.
```
git clone https://github.com/sc0Vu/web3.php.git && cd web3.php && composer install
```
2. Run test script.
```
vendor/bin/phpunit
```
### Docker container
1. Clone the repo and run docker container.
```
git clone https://github.com/sc0Vu/web3.php.git
```
2. Copy web3.php to web3.php/docker/app directory and start container.
```
cp files docker/app && docker-compose up -d php
```
3. Enter php container and install packages.
```
docker-compose exec php ash
```
4. Run test script
```
vendor/bin/phpunit
```
# API # API
Todo. Todo.