Skip to content

Latest commit

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Express.js Request Queue

Uses stack and Async/Await approach

Use this for your express routes if you need those concurrent requests to behave in sequence. If you don't need every request to be queued, set a config and specify your unique identifier to group the queues.

Installation

> npm install express-request-queue --save

Usage

importRequestQfrom'express-request-queue';constq=RequestQ();route.post('/book',q.run(async(req,res,next){awaitlongRunningTask();res.json({});}));

Group queues

Grouping queues base on your request payload:

constconfig={unique: true,// by setting this to true, queues are grouped by thier identifiersfrom: 'body',// what type of req payload the identifier is located fromname: 'id'// name of the field to reference from}constq=RequestQ(config);

License

MIT

Maintainer

John Edward Escuyos

Contributor

Jeserie Golo

About

⛓️ Queues request calls for your express routes.

Topics

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages