Added memwatch for memory leak detection (#10166)

This commit is contained in:
Keith Holliday
2018-03-22 12:44:45 -05:00
committed by Sabe Jones
parent bde8b76da7
commit 25b9e6f330
3 changed files with 19 additions and 2 deletions

View File

@@ -4,6 +4,14 @@ import express from 'express';
import http from 'http';
import Bluebird from 'bluebird';
// @TODO: May need to remove - testing
import memwatch from 'memwatch-next';
memwatch.on('leak', (info) => {
const message = `Memory leak detected:\n${info}`;
logger.error(message);
});
global.Promise = Bluebird;
const server = http.createServer();