mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Added memwatch for memory leak detection (#10166)
This commit is contained in:
committed by
Sabe Jones
parent
bde8b76da7
commit
25b9e6f330
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user