From 193f368686872d850260201d0e622f4a33f2198e Mon Sep 17 00:00:00 2001 From: Ilya Diallo Date: Mon, 22 Feb 2016 22:45:00 +0100 Subject: [PATCH] #510 Detect when the port you are trying to run the server on is already in use. (reverted from commit 7da7c43fcecdea4d40c573f5aba33fada93f4dae) --- src/index.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/index.js b/src/index.js index 344bac89..36f94284 100644 --- a/src/index.js +++ b/src/index.js @@ -188,17 +188,6 @@ function ParseServer({ api.use(middlewares.handleParseErrors); - - process.on('uncaughtException', (err) => { - if( err.code === "EADDRINUSE" ) { // user-friendly message for this common error - console.log(`Unable to listen on port ${err.port}. The port is already in use.`); - process.exit(0); - } - else { - throw err; - } - }); - return api; }