router.get('/http_stats', (req, res) => { res.json({ http: { sockets: socketStats(http.globalAgent.sockets), freeSockets: socketStats(http.globalAgent.freeSockets), }, https: { sockets: socketStats(https.globalAgent.sockets), freeSockets: socketStats(https.globalAgent.freeSockets), }, }); });