quickom-miner
v1.0.16
Published
Downloads
10
Readme
Quickom Miner
Example code
process.env.LIVESTREAM_MANAGER_URL = "wss://classroom-test.dechen.app"
import { MinerStatus, getMinerStatus, minerOnStatus, startMiner, stopMiner } from "quickom-miner"
setImmediate(async () => {
console.log("Start miner ...")
let startTask = startMiner({ binary: "./classroom-core-darwin-x64", minerId: "12312312" })
process.on("SIGTERM", async () => {
console.log("Stoping miner ...")
await stopMiner()
console.log("Stoping miner success")
process.exit()
})
process.on("SIGINT", async () => {
console.log("Stoping miner ...")
await stopMiner()
console.log("Stoping miner success")
process.exit()
})
await startTask
console.log("Start miner success")
console.log("Miner Status", await getMinerStatus())
})