hedgedoc/lib/web/middleware/tooBusy.js
2017-05-08 19:29:06 +08:00

13 lines
231 B
JavaScript

'use strict'
const toobusy = require('toobusy-js')
const response = require('../../response')
module.exports = function (req, res, next) {
if (toobusy()) {
response.errorServiceUnavailable(res)
} else {
next()
}
}