Skip to content

Instantly share code, notes, and snippets.

@distinctgrey
Last active December 18, 2015 03:49
Show Gist options
  • Save distinctgrey/5720964 to your computer and use it in GitHub Desktop.
Save distinctgrey/5720964 to your computer and use it in GitHub Desktop.
npm install connect-modrewrite --save-dev
var modRewrite = require('connect-modrewrite');
[...]
connect: {
options: {
port: 9000,
// change this to '0.0.0.0' to access the server from outside
hostname: 'localhost'
},
livereload: {
options: {
middleware: function (connect) {
return [
modRewrite([
'!\\.?(js|css|html|hbs|eot|svg|ttf|woff|otf|css|png|jpg|git|ico) / [L]'
]),
lrSnippet,
mountFolder(connect, '.tmp'),
mountFolder(connect, 'app')
];
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment