https://github.com/momsfriendlydevco/express-middleware-throttle
https://github.com/momsfriendlydevco/express-middleware-throttle
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/momsfriendlydevco/express-middleware-throttle
- Owner: MomsFriendlyDevCo
- License: mit
- Created: 2020-12-01T02:03:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-11T00:03:54.000Z (about 5 years ago)
- Last Synced: 2025-03-22T15:50:17.237Z (over 1 year ago)
- Language: JavaScript
- Size: 52.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
@MomsFriendlyDevCo/express-middleware-throttle
=======================
Async express middleware throttling mechanism based on MongoDB locking.
```javascript
var emt = require('@momsfriendlydevco/express-middleware-throttle');
app.middleware.express.throttle = emt();
```
API
===
emt(settings)
--------------
Main middleware factory.
Settings
-------------
| Setting | Type | Default | Description |
|----------------------|----------|------------------------------------|-------------------------------------------------|
| `wait` | `number` | 10000 | Milisecond to wait before releasing lock |