Help setting with watch
Danilux opened this issue · comments
Danilo Vega commented
Hi, I'm just giving my first steps with grunt, and I have been trying to set express-server along with watch to run my simple index.html with no success, my current watch configuration is :
watch: {
options: {
livereload: true,
},
scripts: {
files: ['js/*.js'],
tasks: ['concat', 'uglify'],
options: {
spawn: false,
},
},
css: {
files: '**/*.scss',
tasks: ['compass']
},
html: {
files: ['index.html'],
tasks: ['htmlhint']
}
}
In the readme.md watch example you run a tasks for a dev sever that's pointing to "server.js" is that a node server I have to create? Any help as you may see is appreciated.
Paul Pflugradt commented
Yeah. grunt-express-server starts a node instance with a given .js file as a parameter and is able to restart when necessary.
So you should create a server.js where you start an express server which serves the correct files.