If you followed the examples at the link, it looks like your targets should be exec:serverup
and exec:serverdown
for the tasks to work.
The problem here and with many other Grunt related questions is that without the full Gruntfile, "answers" are largely guesses. Configuration, task loading, and task registration are all related and without seeing all three, it is difficult to say "this is the answer".
Given that, here's a checklist I use for problems like this when using Grunt and packages from NPM:
- Is the code that supports the task installed? Did I forget
npm install
? Did I miss errors on install (checknpm-debug.log
if it exists)? - Have I correctly used
grunt.loadNpmTasks
for the plugin? Is the line in my Gruntfile and did I get the plugin name spelled correctly? Did I or my IDE accidentally use togrunt.loadTasks
when I needloadNpmTasks
? - Have I correctly named/used
grunt.registerTask
for the task? If I need to call a specific target for a task, do I have the the name correctly specified? - If there are paths involved and things are broken, do I have my globbing patterns correctly specified? If a
cwd
is involved, do I have the other paths or files correctly specified? - Did I get the configuration right? (This is where things get too plugin-specific for a checklist.)