javascript - Stop running nodemon via Gulp -
here's idea, start app specific port using nodemon run tests, , stop running app run again anytime.
gulp.task('test', function(cb) { nodemon({ script: 'server.js', env: { 'node_env': 'test' } }); // run tests.... // stop application , exit running gulp -> how this? });
is there way stop or force ctrl+c running gulp?
thanks,
kevin
i got these
require('shelljs/global'); // https://github.com/shelljs/shelljs gulp.task('test', ['nodemon-test', 'mocha-test']); gulp.task('nodemon-test', function(cb) { nodemon({ script: 'server.js', env: { 'node_env': 'test' } }) .on('start', function() { cb(); }) }); gulp.task('mocha-test', ['nodemon-test'], function() { exit(1); });