{"_rev":"9-d05e8eb2fa19ebee8322e184653fc79f","time":{"created":"2022-10-25T14:35:11.661Z","0.1.0":"2022-10-23T14:53:20.142Z","modified":"2022-10-25T14:35:12.077Z","5.1.0":"2022-10-25T10:59:24.544Z","5.1.0-alpha":"2022-10-25T12:20:57.241Z","5.1.0-alpha.1":"2022-10-25T13:01:15.358Z","5.0.1-alpha":"2022-10-25T14:35:11.847Z"},"_id":"@amydin/bull-monitor-express","name":"@amydin/bull-monitor-express","dist-tags":{"latest":"5.0.1-alpha"},"versions":{"5.0.1-alpha":{"name":"@amydin/bull-monitor-express","version":"5.0.1-alpha","description":"bull-monitor for express","keywords":["bull"],"author":{"name":"Ilya Strus","email":"strax1990@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/amydinsyahira/bull-monitor.git","directory":"packages/express"},"license":"MIT","types":"dist/index.d.ts","scripts":{"build":"npm run clean && npm run compile","clean":"rm -rf ./dist","compile":"tsc","dev":"tsc --watch"},"main":"dist/index.js","dependencies":{"@amydin/bull-monitor-root":"^5.0.1-alpha","apollo-server-express":"^3.6.3"},"peerDependencies":{"express":"4.x"},"devDependencies":{"@types/express":"^4.17.11","express":"^4.17.1","typescript":"^4.2.4"},"gitHead":"56060c20da8134cce74efaf278dd63b81cdcab4f","bugs":{"url":"https://github.com/amydinsyahira/bull-monitor/issues"},"homepage":"https://github.com/amydinsyahira/bull-monitor#readme","_id":"@amydin/bull-monitor-express@5.0.1-alpha","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-ZQiXB9uJYFa2xHOpY1Jf7yLg+q2PWPnEWcjDWzRyhe89eHiddRwSwO35BGUxtCmU+hvsGF0DHarHzt8tN6gruw==","shasum":"46cfd59ae736ad56a30f12da1af8e171345bb8b9","tarball":"https://registry.npmjs.org/@amydin/bull-monitor-express/-/bull-monitor-express-5.0.1-alpha.tgz","fileCount":8,"unpackedSize":20388,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/LOANpiegbb2qBa3S2bHVZl04rhkqn8TyZl9Kmm963QIgGxzWCLBWj1FX2N3yXdQkrgdGnZSBCabXE4Tl2zsoMVY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV/QfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4Zw/9GCqNp5Q58VzBTunE/zLFkBPYeSWfxutZozTcBZRukACw37sf\r\n9i4EbH+vqAUUb3bxK2kdJtpveLSbmOlN6/HGvydDrqNCYpI8r1xxgP6xkiHV\r\njuVQtEqSwbv5FgknaavcboMFahLUhoONrSbIc97c68ubr+EzNAgiNqAIL1UT\r\nBrY/QTnkCVHJs2D8x7+qvC0raOEJuZRyboYQrNLo++uVdBoqgNg2KrMKJC7T\r\nKRXPlfFuo2d9LS2DAa9DbsFdpPRizTIIi8SWbEBza+JT6y8TYboHWH3RobHJ\r\nbztqa05tGt5ads468pYdfz6v8QTcOqXP6zdk35uIcVDrep2rvzYivlpMevE7\r\nopi3/oqeCYjKKEHqoUhZ41Jq0c+Yn1SGR2YEHpPLi+RaR+y0b+9qHt09LTtd\r\nPTWV/g/5tw4QL8cW0ayv4fQZ7O7S/gfGJfrixHd6/Xqt8EpQy3UfWp7wvzuI\r\nDexliNSwJVgfkDOwNp41R8olx0q+l3xhnTBSj6st7dbrCYSJvS4Mo49BPPpH\r\nIcZS2rFqZEEhTNOEpQ9NPQ0o5sQXBqdxu7+9mZOAqMQyR9VzBn+HQkbFR5Zt\r\nRs6YB05IFAqnOXE5or0MrhTH6MEJkInVHYFla8DGtreVj7dAQuESEupcPbRt\r\nanWEOrLOpgE2D4YBfUqiRRc+NZgpHJQu/yc=\r\n=v7kj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"amydin","email":"amydin17@gmail.com"},"directories":{},"maintainers":[{"name":"amydin","email":"amydin17@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bull-monitor-express_5.0.1-alpha_1666708511724_0.43315766702263003"},"_hasShrinkwrap":false}},"maintainers":[{"name":"amydin","email":"amydin17@gmail.com"}],"description":"bull-monitor for express","homepage":"https://github.com/amydinsyahira/bull-monitor#readme","keywords":["bull"],"repository":{"type":"git","url":"git+https://github.com/amydinsyahira/bull-monitor.git","directory":"packages/express"},"author":{"name":"Ilya Strus","email":"strax1990@gmail.com"},"bugs":{"url":"https://github.com/amydinsyahira/bull-monitor/issues"},"license":"MIT","readme":"# @amydin/bull-monitor-express\n\n[Express](https://github.com/expressjs/express) adapter for [bull-monitor](https://github.com/amydinsyahira/bull-monitor)\n\n## Usage\n\n```sh\nnpm i @amydin/bull-monitor-express\n```\n\n```typescript\nimport { BullMonitorExpress } from '@amydin/bull-monitor-express';\nimport { BullAdapter } from '@amydin/bull-monitor-root/dist/bull-adapter';\n// for BullMQ users\n// import { BullMQAdapter } from \"@amydin/bull-monitor-root/dist/bullmq-adapter\";\nimport Express from 'express';\nimport Queue from 'bull';\n// for Redis adapter\nimport KeyvRedis from '@keyv/redis';\n// import Redis from 'ioredis';\n// for Memcache adapter\n// import KeyvMemcache from '@keyv/memcache';\n\n(async () => {\n  const app = Express();\n  // manually create a storage adapter instance\n  const keyvRedis = new KeyvRedis('redis://user:pass@localhost:6379');\n  // Or reuse a previous Redis instance\n  // const redis = new Redis('redis://user:pass@localhost:6379');\n  // const keyvRedis = new KeyvRedis(redis);\n  // for Memcache\n  // const memcache = new KeyvMemcache('user:pass@localhost:11211');\n  const monitor = new BullMonitorExpress({\n    queues: [\n      new BullAdapter(new Queue('1', 'REDIS_URI')),\n      // readonly queue\n      new BullAdapter(new Queue('2', 'REDIS_URI'), { readonly: true }),\n    ],\n    // enables graphql introspection query. false by default if NODE_ENV == production, true otherwise\n    gqlIntrospection: true,\n    // configure the cache in a manner that isn't unbounded (which is current default behavior). \n    // this protects your server from attacks that exhaust available memory, causing a DOS (adapter: keyvRedis, memcache, etc [https://github.com/jaredwray/keyv#storage-adapters])\n    gqlCache: { adapter: keyvRedis } || 'bounded' || false,\n    // enable metrics collector. false by default\n    // metrics are persisted into redis as a list\n    // with keys in format \"bull_monitor::metrics::{{queue}}\"\n    metrics: {\n      // collect metrics every X\n      // where X is any value supported by https://github.com/kibertoad/toad-scheduler\n      collectInterval: { hours: 1 },\n      maxMetrics: 100,\n      // disable metrics for specific queues\n      blacklist: ['1'],\n    },\n  });\n  await monitor.init();\n  app.use('/my/url', monitor.router);\n  app.listen(3000);\n\n  // replace queues\n  monitor.setQueues([new BullAdapter(new Queue('3', 'REDIS_URI'))]);\n})();\n```\n","readmeFilename":"README.md"}