Created
April 3, 2018 12:32
-
-
Save SaifRehman/f969375445686bee95a9a7dee7811230 to your computer and use it in GitHub Desktop.
node0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config({path: ".env-node1"}); | |
let lotion = require('lotion') | |
let app = lotion({ | |
genesis: './genesis.json', | |
tendermintPort: 30090, | |
initialState: { messages: [] }, | |
p2pPort: 30092, | |
logTendermint: true, | |
keys: 'privkey0.json', | |
peers: ['159.122.175.154:30092'] | |
}) | |
app.use((state, tx,chainInfo) => { | |
if (typeof tx.sender === 'string' && typeof tx.message === 'string') { | |
state.messages.push({ sender: tx.sender, message: tx.message }) | |
} | |
}) | |
app.listen(3000).then(({ GCI }) => { | |
console.log(GCI) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment