Skip to content

Commit

Permalink
give precedence to GET /stats
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 18, 2011
1 parent f97c47f commit f762cc0
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions routes.js
Expand Up @@ -17,6 +17,17 @@ app.get('/', function(req, res, next){
res.render('index', { title: 'Express' }); 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. * GET screenshot.
*/ */
Expand All @@ -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);
});
});

0 comments on commit f762cc0

Please sign in to comment.