I usually start my NodeJS servers with Gulp, with a task similar to:
gulp.task('server', function(){
var port = gulp.env.port || 80;
plugins.nodemon({
script: 'server.js',
ignore: '*',
}).on('start', ['source','watch:source']);
});
That compiles all my Jade & Sass templates and dumps them into an assets folder.
For my current project, I'm introducing vhosts, so that I can have a [X].mysite.com for different node apps. I'm not sure how to run my gulpfile when I start the parent server. Should I actually put one gulpfile in the parent directory, and include all tasks for each vhost app in that one? Same question for 'npm install' and 'bower install'.
tl;dr: How do you run a Gulp or Grunt task for each vhost app when using ExpressJS? Same question for 'npm install' and 'bower install'.