I use browser-sync (https://github.com/shakyShane/browser-sync) in my gulp file for development purposes. I want to use html5mode within my angular app. For that server needs to
You can use https://github.com/tinganho/connect-modrewrite.
var modRewrite = require('connect-modrewrite');
gulp.task('serve', function () {
browserSync.init(null, {
server: {
baseDir: [APP_PATH],
middleware: [
modRewrite([
'!\\.\\w+$ /index.html [L]'
])
]
}
});
// watch only for app specific codes;
...
});