connect middleware for parsing ssi includes, when using the grunt-contrib-connect.
*Not yet available
npm install connect-livereload --save-devnote: you will need to rebuild the default connect middleware stack when adding this to the middleware stack
If you are using connect-livereload middleware, you need to make sure that grunt-connect-ssi is ahead of connect-livereload, otherwise, the parsed files will not include the injected livereload script tags
Options are not mandatory: app.use(require('grunt-connect-livereload')());
The Options have to be provided when the middleware is loaded:
e.g.:
app.use(require('grunt-connect-livereload')({
}));These are the available options with the following defaults:
*coming soon
please see the examples for the app and Grunt configuration.
The following example is from an actual Gruntfile that uses grunt-contrib-connect
For use as middleware in grunt simply add the following to the top of your array of middleware.
require('connect-livereload')(),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').
- the connect static override via middleware was heavily based on connect-livereload
*coming soon
run the tests with
mocha