You can check out the documentation and install the package from the npm 😃
- Install Node.js
- In an empty directory, create new npm project:
npm init -y es6 - Install WorkerBee library from the npm:
npm i @hiveio/workerbee - Create
index.jsfile with the example content:import WorkerBee from "@hiveio/workerbee"; const bot = new WorkerBee(); await bot.start(); console.log("🚀 Bot started! Waiting for new blocks..."); for await (const { id, number } of bot) console.log(`🎉 Got block #${number} with ID: ${id}`); - Run your script:
node index.js
RE: 🐝 Meet WorkerBee: The Easy Way to Build Smart Blockchain Bots