Skip to content

Commit

Permalink
handle error when test server is already running
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Nov 9, 2015
1 parent dc9716b commit 9e6487d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ gulp.task('changelog', function () {
});

gulp.task('serve', function() {
process.on('uncaughtException', function(err) {
if (err.errno === 'EADDRINUSE') {
console.log('Server already running (or port is otherwise in use)');
}
});

server = gulp.src('.')
.pipe(webserver({
host: '0.0.0.0',
Expand Down

0 comments on commit 9e6487d

Please sign in to comment.