hedgedoc/lib/web/middleware/tooBusy.js

14 lines
231 B
JavaScript
Raw Normal View History

2017-04-11 18:05:43 -04:00
'use strict'
const toobusy = require('toobusy-js')
const response = require('../../response')
module.exports = function (req, res, next) {
if (toobusy()) {
response.errorServiceUnavailable(res)
} else {
next()
}
}