boot-livereload
boot-livereload copied to clipboard
Add resource middleware
This patch uses the ring middleware to correctly serve resources other than livereload stuff from the classpath.
Hmh, I have used this together with https://github.com/metosin/boot-alt-http
Serving other resources would require at least option to set the resource prefix. And even then it would only serve files from classpath, not filesystem. I'm not sure if I want to add this feature here.
Ok so maybe I have misunderstood how to use this, I thought I was a replacement for boot-http
but it is not...I am not supposed to connect to localhost:35729
for the entire app right? Only for those the livereload.js
files.
In that case then yeah...I saw http-kit
while exploring the code and thought this was a replacement..
Yeah, not replacement. I guess the readme is a bit confusing.
Btw with this patch everything works because I am passing asset-path
and using it in the handler. So serving from the files is already good, but feel free to close it if you don't see a good fit here.
Now understand while the case
was throwing also, it is not meant to serve anything else :smile: