I'm trying to get grunt-contrib-connect
to work with a directory listing but I also need some static paths as well.
This configuration allows me to browse static html files and it works fine.
server: {
options: {
base: 'src/',
open: true
}
}
The issue is the html files use resources outside of the base directory. So I did the following which allows access to the static resources but the directory listing no longer works.
server: {
options: {
base: 'src/',
open: true,
middleware: function(connect) {
return [
connect().use('/img', connect.static('./img')),
connect().use('/bower_components', connect.static('./bower_components')),
connect.static(yeomanConfig.app)
];
}
}
}
Is it possible for me to have the directory listings and the static paths?