Run multiple applications as a grunt task
* Non-blocking the task-runner
* Restarts the applications when the task is called again
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
files: {
'src/public/css/style.css': 'src/public/css/style.scss'
}
}
},
watch: {
options: {
nospawn: true,
livereload: true
},
server: {
files: [
'src/bin/www',
'src/app.js',
'src/config.js',
'src/routes/*.js',
'src/lib/*.js',
'src/utils/*.js'
],
tasks: ['alive']
}
},
alive:{
webserver: {
cmd: 'node',
args: ['--debug', './bin/www'],
opts: {
stdio: 'inherit',
env: { NODE_ENV: 'development'}
}
}
}
});
alive:{
frontend: {
cmd: 'node',
args: ['--debug', './bin/www'],
opts: {
stdio: 'inherit',
env: { NODE_ENV: 'development'}
}
},
backend: {
cmd: 'node',
args: ['--debug', './bin/backend'],
opts: {
stdio: 'inherit',
env: { NODE_ENV: 'development'}
}
}
}
Copyright (c) 2015, Viktor Braun.