Expose current stats at /stats

pull/1952/head
Marcel Klehr 2013-10-27 18:11:50 +01:00
parent 940f114a84
commit 387091c5c9
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,10 @@ var path = require('path');
var eejs = require('ep_etherpad-lite/node/eejs');
exports.expressCreateServer = function (hook_name, args, cb) {
// expose current stats
args.app.get('/stats', function(req, res) {
res.json(require('ep_etherpad-lite/node/stats').toJSON())
})
//serve index.html under /
args.app.get('/', function(req, res)