I have a little script just with the following function:
const Web3 = require('web3'); var web3Provider = new Web3(new Web3.providers.WebsocketProvider('ws://127.0.0.1:3001')); const web3 = new Web3(web3Provider); web3.eth.getAccounts().then(e => console.log(e));
But when I receive the callback, the script is never closed, it continues running (doing nothing). How can I stoped it? why it happens?