Write apps for Tendermint in Javascript and V based on RMB.
It's simply a proxy app for Tendermint that read request replies from message bus. Examples are included for Javascript and V.
Based on Tendermint 0.34.11
.
Assuming you have already installed Tendermint with the target version, you need to compile the Go proxy app.
go build
Create initial config files:
TMHOME=/path/to/config tendermint init
Then you can run node with our app and give it a twin id for RMB and an app name:
Twin with this ID should have an IP of localhost
, this twin should be create on tfgrid (substrate).
./tm2rmb -config /path/to/config/config.toml -twin 20 -app myapp
Running message bus with the same twin ID:
msgbusd --twin 20
After running Tendermint and node, it's the time to run our app, you can run an example key-value store app that uses redis in Javascript or V.
Tested on node version v14.17.0
:
cd js
npm install
node tm_app.js
cd v
v tm.v
./tm
Do a query first:
curl -s 'localhost:26657/abci_query?data="key1"
Write a value to the same key
curl -s 'curl -s 'localhost:26657/broadcast_tx_commit?tx="key1=somevalue"'
Query again:
curl -s 'localhost:26657/abci_query?data="key1"