var express = require("express");
var app = express();
app.get("/", function(request, response){
response.send("<h2>Привет Express!</h2>");
});
app.listen(3000);
...
const exec = require('child_process').exec;
...
const paths = {
allSrcJs: 'src/**/*.js',
libDir: 'lib',
};
gulp.task('main', gulp.series('build', (callback) => {
exec(`node ${paths.libDir}`, (error, stdout) => {
console.log(stdout);
return callback(error);
});
}));
gulp.task('watch', () => {
gulp.watch(paths.allSrcJs, ['main']);
});