I am developing a smart contract project and I need to listen events on my expressjs-server. Is it possible to listen events from there?

2 Answers 2


You can use Graph to subscribe to event from your contract from your expressjs-server https://ethereum.org/en/developers/tutorials/the-graph-fixing-web3-data-querying/#gatsby-focus-wrapper as an alternative you can use Ethers.JS https://docs.ethers.io/v5/concepts/events/

  • 1
    The Graph doesn't help to actively listen to events because it does not trigger any update to the node-express server. It only extracts data from the blockchain, processing it and storing it so that it can be easily queried via GraphQL. Commented Mar 2, 2023 at 22:49

use web3.js events listener emitted by smart contract Official docs link -


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.