Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@bull-board/api
Advanced tools
@bull-board/api is a package that provides a user interface and API for managing and monitoring Bull queues. It allows developers to visualize and control their job queues, making it easier to track job statuses, retry failed jobs, and manage job lifecycles.
Setting up Bull Board
This code sets up Bull Board with an Express server. It creates a Bull queue and integrates it with Bull Board, making the queue accessible via a web interface at '/admin/queues'.
const { createBullBoard } = require('@bull-board/api');
const { BullAdapter } = require('@bull-board/api/bullAdapter');
const Queue = require('bull');
const someQueue = new Queue('someQueueName');
const { router } = createBullBoard([
new BullAdapter(someQueue)
]);
// Express setup
const express = require('express');
const app = express();
app.use('/admin/queues', router);
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
Adding multiple queues
This code demonstrates how to add multiple Bull queues to Bull Board. It creates two queues and integrates them with Bull Board, making both queues accessible via the web interface.
const { createBullBoard } = require('@bull-board/api');
const { BullAdapter } = require('@bull-board/api/bullAdapter');
const Queue = require('bull');
const firstQueue = new Queue('firstQueue');
const secondQueue = new Queue('secondQueue');
const { router } = createBullBoard([
new BullAdapter(firstQueue),
new BullAdapter(secondQueue)
]);
// Express setup
const express = require('express');
const app = express();
app.use('/admin/queues', router);
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
Customizing Bull Board
This code shows how to customize Bull Board by dynamically adding or replacing queues. The `setQueues` and `replaceQueues` methods allow for flexible queue management.
const { createBullBoard } = require('@bull-board/api');
const { BullAdapter } = require('@bull-board/api/bullAdapter');
const Queue = require('bull');
const someQueue = new Queue('someQueueName');
const { router, setQueues, replaceQueues } = createBullBoard([
new BullAdapter(someQueue)
]);
// Express setup
const express = require('express');
const app = express();
app.use('/admin/queues', router);
app.listen(3000, () => {
console.log('Server is running on port 3000');
});
// Later in the code, you can dynamically add or replace queues
const anotherQueue = new Queue('anotherQueueName');
setQueues([new BullAdapter(anotherQueue)]);
Bull Arena is another package for managing and monitoring Bull queues. It provides a similar web interface for visualizing and controlling job queues. Compared to @bull-board/api, Bull Arena offers more customization options for the UI and supports multiple queue backends like Bull, Bee-Queue, and BullMQ.
Bee-Queue is a high-performance job queue for Node.js that is similar to Bull. While it does not provide a built-in UI like @bull-board/api, it focuses on speed and simplicity. Developers can use third-party tools or build custom interfaces to monitor Bee-Queue jobs.
Agenda is a job scheduling package for Node.js that uses MongoDB for persistence. It provides features for defining, scheduling, and managing jobs. While it does not offer a built-in UI like @bull-board/api, it is highly flexible and can be integrated with custom dashboards or third-party monitoring tools.
FAQs
A Dashboard server API built on top of bull or bullmq.
The npm package @bull-board/api receives a total of 250,688 weekly downloads. As such, @bull-board/api popularity was classified as popular.
We found that @bull-board/api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.