#510 Detect when the port you are trying to run the server on is already in use. (reverted from commit 7da7c43fce)

This commit is contained in:
Ilya Diallo
2016-02-22 22:45:00 +01:00
parent 7da7c43fce
commit 193f368686

View File

@@ -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;
}