mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
try toobusy
This commit is contained in:
parent
16dfa54ad2
commit
233f53da5b
1 changed files with 6 additions and 5 deletions
|
|
@ -47,11 +47,12 @@ options =
|
|||
|
||||
mongo_store = new MongoStore {url: process.env.NODE_DB_URI}, ->
|
||||
expressApp
|
||||
# .use((req, res, next) ->
|
||||
# if toobusy()
|
||||
# return res.redirect 307, 'https://habitrpg.aws.af.cm/'
|
||||
# next()
|
||||
# )
|
||||
.use (req, res, next) ->
|
||||
if toobusy()
|
||||
res.send(503, "Habit's under some heavy load right now, try again in a bit.");
|
||||
else
|
||||
next()
|
||||
|
||||
.use(express.favicon())
|
||||
# Gzip static files and serve from memory
|
||||
.use(gzippo.staticGzip publicPath, maxAge: ONE_YEAR)
|
||||
|
|
|
|||
Loading…
Reference in a new issue