Fix session memory leak

This commit is contained in:
Jonathan Cremin 2015-08-22 18:24:39 +01:00
parent 0289bddde8
commit 046d8475cb
6 changed files with 62 additions and 32 deletions

View file

@ -11,12 +11,12 @@ const debug = debugname('hostr-api');
const router = new Router();
let statsdOpts = {prefix: 'hostr-api', host: process.env.STATSD_HOST || 'localhost'};
router.use(stats(statsdOpts));
let statsd = new StatsD(statsdOpts);
router.use(function*(next) {
this.statsd = statsd;
yield next;
});
router.use(stats(statsdOpts));
router.use(cors({
origin: '*',