Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

give precedence to GET /stats

  • Loading branch information...
commit f762cc0e9a684753027d712d47b902d41fc45201 1 parent f97c47f
TJ Holowaychuk authored
Showing with 11 additions and 10 deletions.
  1. +11 −10 routes.js
21 routes.js
View
@@ -17,6 +17,17 @@ app.get('/', function(req, res, next){
res.render('index', { title: 'Express' });
});
+/**
+ * GET stats.
+ */
+
+app.get('/stats', function(req, res){
+ db.hgetall('screenshot:stats', function(err, obj){
+ if (err) return next(err);
+ res.send(obj);
+ });
+});
+
/*
* GET screenshot.
*/
@@ -33,13 +44,3 @@ app.get('/:url(*)', ratelimit(60, 10), function(req, res, next){
});
});
-/**
- * GET stats.
- */
-
-app.get('/stats', function(req, res){
- db.hgetall('screenshot:stats', function(err, obj){
- if (err) return next(err);
- res.send(obj);
- });
-});
Please sign in to comment.
Something went wrong with that request. Please try again.