Expose current stats at /stats

This commit is contained in:
Marcel Klehr 2013-10-27 18:11:50 +01:00
parent 940f114a84
commit 387091c5c9

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)