[英]Watch Ethereum Smart Contract Events with Node.js App without browser
I need to be able to listen to events from a smart contract on the ethereum blockchain. 我需要能够侦听以太坊区块链上智能合约中的事件。 I'd like to use Node.js but it only seem to work if I open the App in my browser.
我想使用Node.js,但只有在浏览器中打开应用程序后,它才能正常工作。 I want the node app to run in the background, listen for events and then do something automatically.
我希望节点应用程序在后台运行,侦听事件,然后自动执行某些操作。
Is this possible or would you recommend any other technology? 这可能吗,或者您会推荐其他任何技术?
Solution: Minimal Node.js App with express and web3. 解决方案:带有Express和Web3的最小Node.js应用。 Try this repository as a reference, it was very insightful to me: https://github.com/nacmonad/eth-iot-examples/
尝试将此存储库作为参考,这对我来说是很有见地的: https : //github.com/nacmonad/eth-iot-examples/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.