I want to build a simple server that monitors the events of one smart contract and logs them into the terminal.
I have used web3 npm module and programmed the logic of listening to smart contract events and logging them to the console.
When I do “npm start” which does “node server.js”, it immediately returns to the terminal. I was expecting it to hang there and keep logging received events.
How can I make the server keep running and monitoring for emitted events of the smart contract?