Take memory heapdumps or profile CPU usage
Include the following snippet in server program
let DebugServer = require('debug-server')
let debugServer = new DebugServer()
debugServer.start()
Take a memory dump by using
$ curl localhost:1337/snapshot > dump.heapsnapshot
A CPU profile
$ curl localhost:1337/profile > profile.cpuprofile