grunt-http-server v1.14.0
grunt-http-server was bumped to version 1.14.0 and it now allows you to setup custom pages.
npm i grunt-http-server --save-dev
custom pages
Let's say that you need the root url to serve your README.md, making it easier for developers to access it from within the developer environment.
grunt.initConfig({
'http-server': {
'dev': {
customPages: {
"/": "./README.md"
}
}
}
});
Another common use case would be to test your compiled html code and serve it from a defined path.
grunt.initConfig({
'http-server': {
'dev': {
customPages: {
"/": "./index.html",
"/about": "./about.html"
}
}
}
});
Don't forget to share your story, if you have a different use case.
Oscar out.