问题
I use grunt-serve and access the files that it serves through localhost:9000, I want to change that to
localhost:9000/mypath
I read on the documentation that I can do the following
'serve': {
'path': '/Users/user/Documents/workspace/project'
}
But I don't know where to put this options.
I have found a similar question but no answers.
回答1:
The configuration block for the grunt-serve plugin should reside (as with any other task configuration) in the config object passed to grunt.config.init, e.g.:
grunt.config.init({
serve: {
path: '/Users/user/Documents/workspace/project'
},
// ...
});
来源:https://stackoverflow.com/questions/30595778/change-grunt-serve-default-path