Starting multiple tools like grunt and http-server in one terminal

I'm using git-bash on windows and I find it annoying to open up two terminal windows (and navigating to the right path in both) to:

  • start a http-server to server static files (node tool)
  • start grunt (default grunt task is grunt-watch which watches the file system and runs tasks when things change)

What I want is to be able to execute a bash script or something to

  1. start the http-server
  2. start other things if relevant
  3. run the grunt command to start it watching

My questions are:

  1. is it possible?
  2. is it practical? (i.e. console feedback might not be possible or would be confusing if multiple things were able to be shown as they would be interwoven.. if that is even possible)
  3. is there a better way? -- other than multiple terminals :o)

If your using Grunt already, you should be able to utilize Grunt's task queues to run multiple tasks in one go. Typically, for each project you have some default task that orchestrates a running development environment like so:

grunt.registerTask(
    'default', 
    'Starts the server in development mode and watches for changes', 
    ['build', 'server', 'watch']);

Sometimes, though, merely queuing tasks isn't enough. You can drop into writing ad-hoc tasks and utilize Grunt's extensive API, such as grunt.task.run and the rich context inside of tasks.

I am not going to bombard you with examples, but things you can do here can range from fetching data from remote sources, spawning different child processes, piping their stdin to the Grunt process and starting arbitrary tasks using grunt.task.run.