From 18bbde36605358f344ab6c81498b82b562fb6b2c Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 18 Jan 2013 22:00:38 -0500 Subject: [PATCH] add error page for toobusy --- public/heavyLoad.html | 51 +++++++++++++++++++++++++++++++++++++++++ src/server/index.coffee | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 public/heavyLoad.html diff --git a/public/heavyLoad.html b/public/heavyLoad.html new file mode 100644 index 0000000000..e6c3f9c410 --- /dev/null +++ b/public/heavyLoad.html @@ -0,0 +1,51 @@ + + + + HabitRPG | Gamify Your Life + + + + + + + + + + + +
+
+ +

The server is under heavy load or is experiencing issues.

+

Try refreshing in a few, the developer has been notified. In the meantime, Habit could use your support to get these issues squared away - please consider backing the Kickstarter Campaign.

+ Kickstarter +
+
+

 

+

+
+
+

+
+ + diff --git a/src/server/index.coffee b/src/server/index.coffee index 7bfaf534bd..fe1331e85c 100644 --- a/src/server/index.coffee +++ b/src/server/index.coffee @@ -50,7 +50,7 @@ mongo_store = new MongoStore {url: process.env.NODE_DB_URI}, -> expressApp .use (req, res, next) -> if toobusy() - res.send(503, "Habit's under some heavy load right now, try again in a bit."); + return res.redirect 307, '/heavyLoad.html' else next()