Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
Change port in use error to be human readable
Browse files Browse the repository at this point in the history
If there is a process using the port that Soletta Dev-App is
configure to run. Nodejs will print an understandable error.

Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
  • Loading branch information
Bruno Bottazzini committed Feb 22, 2016
1 parent 239e440 commit 6363819
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
}
});

server.once('error', function(err) {
if (err.code === 'EADDRINUSE') {
console.log('Error: Could not run the Soletta Dev-App server.' +
'\nPort ' + jConf.server_port + ' is already in use');
}
});

module.exports = app;
} catch (err) {
console.log(err);
Expand Down

0 comments on commit 6363819

Please sign in to comment.