Search code examples
gruntjsgrunt-contrib-connectgrunt-connect

What is the difference between grunt-connect and grunt-contrib-connect?


I've seen problems stem from confusing grunt-connect and grunt-contrib-connect(See grunt connect port option ignored and grunt watch & connect)

Given their similarity and conflicting natures, could someone describe their syntactical differences, as well as any functional differences?


Solution

  • grunt-connect

    • For when you want to run a server indefinitely, for example on a web server (note: this is not what grunt is intended for, instead use grunt to process files, then something like nodejs or apache HTTP server, to host the processed files).

    grunt-contrib-connect

    • When you want to start a web server for other grunt tasks to use.

    grunt-serve

    • This is similar to grunt-connect and is what I use in my projects.