Closed azhang closed 10 years ago
you need to define the https://github.com/blai/grunt-express#bases options when you want to do livereload, this is for the plugin to know the set of files to watch for livereloading.
However, livereload may not work right now anyway due to some limitation on grunt-contrib-watch
.
Ah, gotcha. Thanks.
So, just to be sure, if we define the "bases" option, it will not hijack the "express.static()" middleware we already have in our server, right? The documentation did not make this clear.
Correct.— Sent from Mailbox
On Mon, Jun 9, 2014 at 12:31 AM, trisys3 notifications@github.com wrote:
So, just to be sure, if we define the "bases" option, it will not hijack the "express.static()" middleware we already have in our server, right?
Reply to this email directly or view it on GitHub: https://github.com/blai/grunt-express/issues/59#issuecomment-45460475
Hi, I am also getting this error:
Running "express:all" (express) task Warning: Cannot call method 'map' of undefined Use --force to continue.
Can you please point me to a solution, I am new to Grunt and kind of don't understand how/what to define in bases.
Here is my configuration in gruntfile.js
express: {
all: {
options: {
port: 9000,
hostname: 'localhost',
base: ['.'],
livereload: true
}
}
}
grunt.registerTask('server', ['express', 'watch']);
}
Thanks.
Zigson, the option name is "bases", not "base". However, this may not be your only problem.
Sean, thanks for pointing this out. Will try further on.
I've just updated from 1.2.1 to 1.3.4. no change in config.