try toobusy

This commit is contained in:
Tyler Renelle 2013-01-18 01:38:01 -05:00
parent 16dfa54ad2
commit 233f53da5b

View file

@ -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)