I'm just curious to know if its possible to serve .html files without the .html file extension at the end just for vanity purposes if its not possible that okay.
Thanks for making such a great tool for devs everywhere. Kudos!
Npm [ 3.6.0 ]
[ ] API
sure
var bs = require("./").create();
// Start the server
bs.init({
server: {
baseDir: "./app",
serveStaticOptions: {
extensions: ['html']
}
}
});

Holy crap that worked! Thanks maybe serveStaticOptions should be on the docs 馃榿
Wow, that worked on my Foundation project! I had been fighting how to get pretty URLs to work on development environment (I'm more designer than developer), and this did it鈥攖hanks! :)
I'm also not able to get this to work, using the latest version of Browsersync, 2.16.0
@arloduff share your gulp file or bs.config.js file
I've just ran it no problem with both on the latest version ;)
This is my bs-config.js
module.exports = {
"port": 8000,
"server": {
"baseDir": "dist",
"index": "dist/my-app/index.html",
"serveStaticOptions": {
"extensions": [
"html",
"js"
]
}
},
"startPath": "/my-app"
};
It seems to be picking up the .html but if I try to make a request for a js file it doesn't recognize it without the extension.
i don't think ANY server would do that lol
I thought that was the point of this feature. Is it only supposed to pick up html files?
you should try it, but im guessing it should be limited to php and html files
Seems it should have been
extensions: "html,js"
Most helpful comment
sure