mirror of
https://github.com/status-im/codimd.git
synced 2025-02-10 13:26:51 +00:00
15 lines
285 B
TypeScript
15 lines
285 B
TypeScript
import toobusy from "toobusy-js";
|
|
|
|
import config from "../config";
|
|
import * as response from "../response";
|
|
|
|
toobusy.maxLag(config.responseMaxLag)
|
|
|
|
export default function (req, res, next) {
|
|
if (toobusy()) {
|
|
response.errorServiceUnavailable(req, res)
|
|
} else {
|
|
next()
|
|
}
|
|
}
|