How does gulp-nodemon work with browser-sync to restart the back end and refresh the front end?

  node.js, question

My nodejs backend service port is 3000 and can run normally, so browser-sync uses proxy mode.
This is gulpfile.js that i read the document and tried to write.

'use strict';
 var gulp       = require('gulp');
 var nodemon    = require('gulp-nodemon');
 var browserSync = require('browser-sync').create();
 var reload = browserSync.reload;
 
 // nodemon configuration
 gulp.task('nodeServer',function () {
 return nodemon({
 script:'app.js',
 env: { 'NODE_ENV': 'development' }
 })
 });
 gulp.task('reload',['nodeServer'],function () {
 browserSync.init({
 proxy:'localhost'
 });
 });

Starting now will report an error.

Error: listen EADDRINUSE :::3000
 ...

Can you tell me how to write gulpfile.js to monitor the project changes and refresh the front end after restarting the back end?

proxy:’localhost:3000′