For use as middleware in grunt simply add the following to the **top** of your array of middleware.
```javascript
require('connect-inject')(),
```
You can pass in options to this call if you do not want the defaults.
`dev` is simply the name of the server being used with the task `grunt connect:dev`. The other items in the `middleware` array are all functions that either are of the form `function (req, res, next)` like `checkForDownload` or return that like `mountFolder(connect, 'something')`.
credits
=======
This is a slightly modified version of [connect-livereload](https://github.com/intesso/connect-livereload) all the credits go to the author.