Skip to content

Commit 9e6487d

Browse files
committed
handle error when test server is already running
1 parent dc9716b commit 9e6487d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gulpfile.js

+6
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ gulp.task('changelog', function () {
7171
});
7272

7373
gulp.task('serve', function() {
74+
process.on('uncaughtException', function(err) {
75+
if (err.errno === 'EADDRINUSE') {
76+
console.log('Server already running (or port is otherwise in use)');
77+
}
78+
});
79+
7480
server = gulp.src('.')
7581
.pipe(webserver({
7682
host: '0.0.0.0',

0 commit comments

Comments
 (0)