Skip to content

Instantly share code, notes, and snippets.

@raykao
Created December 21, 2013 20:40
Show Gist options
  • Save raykao/8074743 to your computer and use it in GitHub Desktop.
Save raykao/8074743 to your computer and use it in GitHub Desktop.
Grunt-connect-rewrite config for Ember Apps. This config settings is for use in Development using grunt-contrib-connect and setting Router location property to history (location: 'history')
options: {
port: 9000,
// change this to '0.0.0.0' to access the server from outside
hostname: 'localhost'
},
rules: [
// Internal rewrite
{from: '(^((?!css|html|js|images|fonts|\/$).)*$)', to: '/index.html#$1'}
],
dev: {
options: {
middleware: function (connect, options) {
return [
rewriteRulesSnippet,
mountFolder(connect, 'dev')
];
}
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment