{"_id":"@aios-medical/bullmq-dashboard-express","_rev":"3-267602f5fc30dbfea49b7a4707c5670a","name":"@aios-medical/bullmq-dashboard-express","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@aios-medical/bullmq-dashboard-express","version":"1.0.0","keywords":["bull","bullmq","redis","express","adapter","queue","monitoring","dashboard","aios"],"license":"MIT","_id":"@aios-medical/bullmq-dashboard-express@1.0.0","maintainers":[{"name":"gentritabazi01","email":"gentritabazi01@gmail.com"}],"homepage":"https://github.com/fellahealth/aios-bullmq-dashboard#readme","bugs":{"url":"https://github.com/fellahealth/aios-bullmq-dashboard/issues"},"dist":{"shasum":"71146fd2e6ae76db89d9d2f8dbe12bbfbb32ff7d","tarball":"https://registry.npmjs.org/@aios-medical/bullmq-dashboard-express/-/bullmq-dashboard-express-1.0.0.tgz","fileCount":13,"integrity":"sha512-MZmQ7o1w6Yk9NuubxIYRxeVwQJ/Ldx4erPUEE9k5kNrZ/s7/R8fA5unvfZVeGD7bMF/5YLG94lWK9crTrn+BzQ==","signatures":[{"sig":"MEUCIQDlzJm959gqYBu5Q4mznO1iF8ljdQXw6JIEi5yGJDFpOwIgTZ24KrbxY7Wi9so+6GVk86qQVGpsqjqAH9yEHnoZ5YQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14387},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"8c19569a50e5698d5d0f540f1e7dea6baa9f69ae","scripts":{"build":"yarn clean && tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"gentritabazi01","email":"gentritabazi01@gmail.com"},"repository":{"url":"git+https://github.com/fellahealth/aios-bullmq-dashboard.git","type":"git","directory":"packages/express"},"_npmVersion":"10.9.7","description":"Express.js server adapter for the aios bullmq dashboard.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"ejs":"^3.1.10","express":"^4.21.2","@aios-medical/bullmq-dashboard-ui":"^1.0.0","@aios-medical/bullmq-dashboard-api":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ejs":"^3.1.5","typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bullmq-dashboard-express_1.0.0_1779913682406_0.22411624968312682","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aios-medical/bullmq-dashboard-express","version":"1.0.1","keywords":["bull","bullmq","redis","express","adapter","queue","monitoring","dashboard","aios"],"license":"MIT","_id":"@aios-medical/bullmq-dashboard-express@1.0.1","maintainers":[{"name":"gentritabazi01","email":"gentritabazi01@gmail.com"}],"homepage":"https://github.com/fellahealth/aios-bullmq-dashboard#readme","bugs":{"url":"https://github.com/fellahealth/aios-bullmq-dashboard/issues"},"dist":{"shasum":"4554da67eacdb2eb54550efb7ebd295594dc7e0b","tarball":"https://registry.npmjs.org/@aios-medical/bullmq-dashboard-express/-/bullmq-dashboard-express-1.0.1.tgz","fileCount":14,"integrity":"sha512-bNBrTKXtAdObQHCX2NawMn50B0zK1Wn8BtVByWy3y2CM9qpd3yeQ+tq0f/bBiTG0MQNFXTebMqzojgzELQZCtA==","signatures":[{"sig":"MEUCIQCPEeK7go9rZuLpWMXdrAeXbfvbl0EtupJylYpJadfHbgIgFJz7f90IXUcJyR6biXY9KcPz9RrqVw3X7CRCWcKnX5I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22503},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"c9fb8a7a89d35446b4af1138642fbf9372b31384","scripts":{"build":"yarn clean && tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"gentritabazi01","email":"gentritabazi01@gmail.com"},"repository":{"url":"git+https://github.com/fellahealth/aios-bullmq-dashboard.git","type":"git","directory":"packages/express"},"_npmVersion":"10.9.7","description":"Express.js server adapter for the aios bullmq dashboard.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"ejs":"^3.1.10","express":"^4.21.2","@aios-medical/bullmq-dashboard-ui":"^1.0.0","@aios-medical/bullmq-dashboard-api":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/ejs":"^3.1.5","typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bullmq-dashboard-express_1.0.1_1780680515321_0.25447217023714175","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aios-medical/bullmq-dashboard-express","version":"1.0.2","description":"Express.js server adapter for the aios bullmq dashboard.","repository":{"type":"git","url":"git+https://github.com/fellahealth/aios-bullmq-dashboard.git","directory":"packages/express"},"homepage":"https://github.com/fellahealth/aios-bullmq-dashboard#readme","bugs":{"url":"https://github.com/fellahealth/aios-bullmq-dashboard/issues"},"keywords":["bull","bullmq","redis","express","adapter","queue","monitoring","dashboard","aios"],"license":"MIT","main":"dist/index.js","scripts":{"build":"yarn clean && tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"dependencies":{"@aios-medical/bullmq-dashboard-api":"^1.0.0","@aios-medical/bullmq-dashboard-ui":"^1.0.0","ejs":"^3.1.10","express":"^4.21.2"},"devDependencies":{"@types/ejs":"^3.1.5","@types/express":"^5.0.0","typescript":"^5.7.2"},"publishConfig":{"access":"public"},"_id":"@aios-medical/bullmq-dashboard-express@1.0.2","gitHead":"40a63d98ac4b1e37941704ea49e76fcd575be83a","types":"./dist/index.d.ts","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-00qN2AZ6JCBM+8jDWC7FYlPimM6D7/QHH5ael8Aa+8U9QZSS0bm6RoQjP2zBwbg8g2rRmOFuW6C7FLZMkQEcUQ==","shasum":"b97190bba07b1b36363c1d46681c6b610d608806","tarball":"https://registry.npmjs.org/@aios-medical/bullmq-dashboard-express/-/bullmq-dashboard-express-1.0.2.tgz","fileCount":14,"unpackedSize":22653,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDjfI4UNF3FT3Svxt1aq9e+kHeGSUSCoBw8P0HwE0u4dQIgeFDZ+yWny686Pd3iK0oQq+6+QT9LqISrpZTKXQcMQH0="}]},"_npmUser":{"name":"gentritabazi01","email":"gentritabazi01@gmail.com"},"directories":{},"maintainers":[{"name":"gentritabazi01","email":"gentritabazi01@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bullmq-dashboard-express_1.0.2_1780681071817_0.6219302562511471"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-27T20:28:02.278Z","modified":"2026-06-05T17:37:52.374Z","1.0.0":"2026-05-27T20:28:02.543Z","1.0.1":"2026-06-05T17:28:35.453Z","1.0.2":"2026-06-05T17:37:51.960Z"},"bugs":{"url":"https://github.com/fellahealth/aios-bullmq-dashboard/issues"},"license":"MIT","homepage":"https://github.com/fellahealth/aios-bullmq-dashboard#readme","keywords":["bull","bullmq","redis","express","adapter","queue","monitoring","dashboard","aios"],"repository":{"type":"git","url":"git+https://github.com/fellahealth/aios-bullmq-dashboard.git","directory":"packages/express"},"description":"Express.js server adapter for the aios bullmq dashboard.","maintainers":[{"name":"gentritabazi01","email":"gentritabazi01@gmail.com"}],"readme":"# @aios-medical/bullmq-dashboard-express\n\nExpress.js server adapter for the AIOS BullMQ Dashboard.\n\n<img alt=\"AIOS BullMQ Dashboard overview\" src=\"https://raw.githubusercontent.com/fellahealth/aios-bullmq-dashboard/main/screenshots/overview.png\" />\n\n## Installation\n\n```bash\nnpm install @aios-medical/bullmq-dashboard-express\n# or\nyarn add @aios-medical/bullmq-dashboard-express\n# or\npnpm add @aios-medical/bullmq-dashboard-express\n```\n\n## Overview\n\nThis package provides an Express.js adapter for serving the AIOS BullMQ Dashboard. It handles routing, middleware integration, and serves the static UI assets.\n\n## Usage\n\n### Basic Setup\n\n```typescript\nimport express from 'express';\nimport { createDashboard } from '@aios-medical/bullmq-dashboard-api';\nimport { BullMQAdapter } from '@aios-medical/bullmq-dashboard-api/bullMQAdapter';\nimport { ExpressAdapter } from '@aios-medical/bullmq-dashboard-express';\nimport { Queue } from 'bullmq';\n\nconst app = express();\n\n// Create your BullMQ queue\nconst queue = new Queue('my-queue', { \n  connection: { host: 'localhost', port: 6379 } \n});\n\n// Create the Express adapter\nconst serverAdapter = new ExpressAdapter();\nserverAdapter.setBasePath('/admin/queues');\n\n// Create the dashboard\ncreateDashboard({\n  queues: [new BullMQAdapter(queue)],\n  serverAdapter,\n  options: {\n    uiConfig: {\n      title: 'My Queue Dashboard',\n      subtitle: 'Production',\n    },\n  },\n});\n\n// Mount the dashboard\napp.use('/admin/queues', serverAdapter.getRouter());\n\napp.listen(3000, () => {\n  console.log('Dashboard running on http://localhost:3000/admin/queues');\n});\n```\n\n### With Bull (Legacy)\n\n```typescript\nimport express from 'express';\nimport { createDashboard } from '@aios-medical/bullmq-dashboard-api';\nimport { BullAdapter } from '@aios-medical/bullmq-dashboard-api/bullAdapter';\nimport { ExpressAdapter } from '@aios-medical/bullmq-dashboard-express';\nimport Queue from 'bull';\n\nconst app = express();\n\nconst queue = new Queue('my-queue', { \n  redis: { host: 'localhost', port: 6379 } \n});\n\nconst serverAdapter = new ExpressAdapter();\nserverAdapter.setBasePath('/admin/queues');\n\ncreateDashboard({\n  queues: [new BullAdapter(queue)],\n  serverAdapter,\n  options: {\n    uiConfig: {\n      title: 'My Queue Dashboard',\n    },\n  },\n});\n\napp.use('/admin/queues', serverAdapter.getRouter());\n\napp.listen(3000);\n```\n\n### Multiple Queues\n\n```typescript\nconst emailQueue = new Queue('emails', { connection: { host: 'localhost', port: 6379 } });\nconst reportQueue = new Queue('reports', { connection: { host: 'localhost', port: 6379 } });\n\nconst serverAdapter = new ExpressAdapter();\nserverAdapter.setBasePath('/admin/queues');\n\ncreateDashboard({\n  queues: [\n    new BullMQAdapter(emailQueue, { displayName: 'Email Queue' }),\n    new BullMQAdapter(reportQueue, { displayName: 'Report Queue' }),\n  ],\n  serverAdapter,\n  options: {\n    uiConfig: {\n      title: 'Production Queues',\n    },\n  },\n});\n\napp.use('/admin/queues', serverAdapter.getRouter());\n```\n\n### With Authentication\n\n```typescript\nimport basicAuth from 'express-basic-auth';\n\nconst serverAdapter = new ExpressAdapter();\nserverAdapter.setBasePath('/admin/queues');\n\ncreateDashboard({\n  queues: [new BullMQAdapter(queue)],\n  serverAdapter,\n  options: {\n    uiConfig: {\n      title: 'Protected Dashboard',\n    },\n  },\n});\n\n// Add authentication middleware\napp.use('/admin/queues', basicAuth({\n  challenge: true,\n  users: { admin: process.env.DASHBOARD_PASSWORD || 'secret' },\n}));\n\napp.use('/admin/queues', serverAdapter.getRouter());\n```\n\n### Custom Middleware\n\nYou can add any Express middleware before mounting the dashboard:\n\n```typescript\nconst serverAdapter = new ExpressAdapter();\nserverAdapter.setBasePath('/admin/queues');\n\n// Rate limiting\nimport rateLimit from 'express-rate-limit';\n\nconst limiter = rateLimit({\n  windowMs: 15 * 60 * 1000, // 15 minutes\n  max: 100 // limit each IP to 100 requests per windowMs\n});\n\napp.use('/admin/queues', limiter);\n\n// CORS\nimport cors from 'cors';\napp.use('/admin/queues', cors());\n\n// Mount dashboard\napp.use('/admin/queues', serverAdapter.getRouter());\n```\n\n## API Reference\n\n### ExpressAdapter\n\nThe main class for configuring the Express adapter.\n\n#### Constructor\n\n```typescript\nconstructor()\n```\n\nCreates a new ExpressAdapter instance with an internal Express app.\n\n#### Methods\n\n##### setBasePath(path: string)\n\nSets the base path for the dashboard routes.\n\n```typescript\nserverAdapter.setBasePath('/admin/queues');\n```\n\n##### setStaticPath(staticsRoute: string, staticsPath: string)\n\nConfigures static file serving for UI assets.\n\n```typescript\nserverAdapter.setStaticPath('/static', '/path/to/dist/static');\n```\n\n##### setViewsPath(viewPath: string)\n\nSets the views path for EJS templates.\n\n```typescript\nserverAdapter.setViewsPath('/path/to/dist');\n```\n\n##### setErrorHandler(handler: (error: Error) => ControllerHandlerReturnValue)\n\nSets the error handler for API routes.\n\n```typescript\nserverAdapter.setErrorHandler((error) => {\n  return {\n    status: 500,\n    body: { error: error.message }\n  };\n});\n```\n\n##### setQueues(queueRegistry: QueueRegistry)\n\nSets the queue registry (called automatically by `createDashboard`).\n\n```typescript\nserverAdapter.setQueues(queueRegistry);\n```\n\n##### setUIConfig(config: UIConfig)\n\nSets the UI configuration (called automatically by `createDashboard`).\n\n```typescript\nserverAdapter.setUIConfig({\n  title: 'My Dashboard',\n  subtitle: 'Production',\n});\n```\n\n##### getRouter()\n\nReturns the Express router to be mounted in your app.\n\n```typescript\napp.use('/admin/queues', serverAdapter.getRouter());\n```\n\n## Configuration\n\nThe adapter is configured through the `createDashboard` function from the API package. All UI configuration is passed through the `options.uiConfig` parameter:\n\n```typescript\ncreateDashboard({\n  queues: [new BullMQAdapter(queue)],\n  serverAdapter,\n  options: {\n    uiConfig: {\n      title: 'My Dashboard',\n      subtitle: 'Production',\n      environment: {\n        label: 'Production',\n        color: '#ef4444',\n      },\n      pollingInterval: {\n        forceInterval: 5000,\n      },\n      miscLinks: [\n        { text: 'Docs', url: 'https://docs.example.com' },\n      ],\n      hideRedisDetails: false,\n    },\n  },\n});\n```\n\n## Advanced Usage\n\n### Nested Routes\n\nYou can nest the dashboard under existing routes:\n\n```typescript\nconst apiRouter = express.Router();\nconst serverAdapter = new ExpressAdapter();\nserverAdapter.setBasePath('/dashboard');\n\ncreateDashboard({\n  queues: [new BullMQAdapter(queue)],\n  serverAdapter,\n});\n\napiRouter.use('/dashboard', serverAdapter.getRouter());\napp.use('/api/v1', apiRouter);\n\n// Dashboard available at /api/v1/dashboard\n```\n\n### Custom Error Handling\n\n```typescript\nserverAdapter.setErrorHandler((error) => {\n  console.error('Dashboard error:', error);\n  \n  return {\n    status: 500,\n    body: {\n      error: 'Internal server error',\n      message: process.env.NODE_ENV === 'development' ? error.message : undefined,\n    },\n  };\n});\n```\n\n### Multiple Instances\n\nYou can run multiple dashboard instances with different configurations:\n\n```typescript\nconst prodAdapter = new ExpressAdapter();\nprodAdapter.setBasePath('/admin/prod-queues');\n\ncreateDashboard({\n  queues: [new BullMQAdapter(prodQueue)],\n  serverAdapter: prodAdapter,\n  options: {\n    uiConfig: { title: 'Production Queues' },\n  },\n});\n\nconst devAdapter = new ExpressAdapter();\ndevAdapter.setBasePath('/admin/dev-queues');\n\ncreateDashboard({\n  queues: [new BullMQAdapter(devQueue)],\n  serverAdapter: devAdapter,\n  options: {\n    uiConfig: { title: 'Development Queues' },\n  },\n});\n\napp.use('/admin/prod-queues', prodAdapter.getRouter());\napp.use('/admin/dev-queues', devAdapter.getRouter());\n```\n\n## Dependencies\n\n- **express**: ^4.21.2\n- **ejs**: ^3.1.10\n- **@aios-medical/bullmq-dashboard-api**: ^1.0.0\n- **@aios-medical/bullmq-dashboard-ui**: ^1.0.0\n\n## License\n\nMIT\n\n## Related Packages\n\n- [@aios-medical/bullmq-dashboard-api](https://www.npmjs.com/package/@aios-medical/bullmq-dashboard-api) - Core API package\n- [@aios-medical/bullmq-dashboard-ui](https://www.npmjs.com/package/@aios-medical/bullmq-dashboard-ui) - React UI component\n- [@aios-medical/bullmq-dashboard-nestjs](https://www.npmjs.com/package/@aios-medical/bullmq-dashboard-nestjs) - NestJS module","readmeFilename":"README.md"}