Write by node.js, handle the ethereum web3.js. Contains:
- Kafka consumer
- Kafka producer
- web3.js proxy
- Event listener worker
brew install node
-- install nvm
npm install nvm
-- install node version 6+
nvm install 6.9.1
-- will use pm2 for starting server
npm install pm2 -g
geth --networkid 16888 --port 30303 --nodiscover --maxpeers 25 --nat "any" --rpc --rpccorsdomain "*" --rpcapi "eth,net,web3,debug" --mine --minerthreads 1 --autodag
git clone https://github.com/PhyrexTsai/blockchainbox-node.git
cd blockchainbox-node
-- start service with pm2
./start.sh
geth attach
personal.unlockAccount('4c25526a6b567c067396bd1fe0a1936117875436','password',600000);
http://localhost:3000/ethereum/coinbase
http://localhost:3000/ethereum/balance
--
-
setup
cors
for whitelist hostnames -
put
npm install pm2 -g
inethereum/Dockerfile
-
pm2 with docker
-
using kafka on pm2
- insertQueueConsumer.js
- run kafka consumer
- insertQueueConsumer.js