Created
March 13, 2018 19:40
-
-
Save SaifRehman/64f9f54fa00e3d5683c435ed89b88806 to your computer and use it in GitHub Desktop.
Lotion/tendermint Blockchain server
This file contains 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
let app = require('lotion')({ | |
lotioPort: 3000, | |
tendermintPort: 46657, | |
initialState: { messages: [] }, | |
devMode: true | |
}) | |
app.use((state, tx) => { | |
if (typeof tx.sender === 'string' && typeof tx.message === 'string') { | |
state.messages.push({ sender: tx.sender, message: tx.message }) | |
} | |
}) | |
app.listen(3000).then(function (data) { | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment