{"id":23098972,"url":"https://github.com/four43/node-express-enqueue","last_synced_at":"2025-08-16T13:30:40.423Z","repository":{"id":57231811,"uuid":"59165521","full_name":"four43/node-express-enqueue","owner":"four43","description":"A rate-limiting middleware that ensures only the desired number of requests are being worked on concurrently.","archived":false,"fork":false,"pushed_at":"2018-02-07T04:23:40.000Z","size":23,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T05:54:37.546Z","etag":null,"topics":["expressjs","nodejs","queue","request"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/four43.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-19T01:59:09.000Z","updated_at":"2021-04-14T23:08:06.000Z","dependencies_parsed_at":"2022-09-04T17:31:45.558Z","dependency_job_id":null,"html_url":"https://github.com/four43/node-express-enqueue","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/four43/node-express-enqueue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/four43%2Fnode-express-enqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/four43%2Fnode-express-enqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/four43%2Fnode-express-enqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/four43%2Fnode-express-enqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/four43","download_url":"https://codeload.github.com/four43/node-express-enqueue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/four43%2Fnode-express-enqueue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269705473,"owners_count":24462172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","nodejs","queue","request"],"created_at":"2024-12-16T23:15:59.252Z","updated_at":"2025-08-16T13:30:40.114Z","avatar_url":"https://github.com/four43.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-express-enqueue\n\nA rate-limiting middleware that ensures only the desired number of requests are being worked on concurrently.\n\n[![Build Status](https://travis-ci.org/four43/node-express-enqueue.svg?branch=master)](https://travis-ci.org/four43/node-express-enqueue)\n[![Coverage Status](https://coveralls.io/repos/github/four43/node-express-enqueue/badge.svg?branch=master)](https://coveralls.io/github/four43/node-express-enqueue?branch=master)\n\n## Example\n\n`express-enqueue` is instantiated before use:\n```javascript\nconst Enqueue = require('express-enqueue'),\n    app = require('express')();\n    \nconst queue = new Enqueue({\n    concurrentWorkers: 4,\n    maxSize: 200,\n    timeout: 30000\n});\n\napp.use(queue.getMiddleware());\napp.get('/hello', (req, res) =\u003e res.json({hello:'world'}));\napp.use(queue.getErrorMiddleware());\napp.listen(9000);\n```\n\n## Options\n\n| Option              |            Type (default)  | Description                                                                                                        |\n|---------------------|----------------------------|--------------------------------------------------------------------------------------------------------------------|\n| `concurrentWorkers` | Integer (# of cores)       | The number of concurrent workers, how many requests should be worked on at once.                                   |\n| `queueMaxSize`      | Integer (1000)             | The maximum number of open requests.                                                                               |\n| `timeout`           | Integer,time in ms. (none) | If a request has been sitting the queue for more than this time, it will be skipped and an error will be returned. |\n\n## Methods\n\n### getMiddleware()\n\nGets the Express middleware. This queue can be used app-wide or to limit a specific controller.\n\n### getErrorMiddleware(`json`)\n\nGets the error handling middleware that will parse `express-enqueue` specific errors and send appropriate error codes and messages. It will output them in JSON by default, but when the first argument is set to false it will just output the message. \n\n### getStats()\n\nReturns stats about the queue, `{{total: number, inProgress: number, waiting: number}}`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffour43%2Fnode-express-enqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffour43%2Fnode-express-enqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffour43%2Fnode-express-enqueue/lists"}