babashka / http-server

Serve static assets
MIT License
77 stars 8 forks source link

Introduce router function as top-level so it can be referred #4

Closed keychera closed 1 year ago

keychera commented 1 year ago

Hello, I am trying to make live reloading solution that I'm building work with this http-server, and basically it only needs to move the router function outside the serve function to a top-level definition. I made the change in this fork here: https://github.com/keychera/http-server/commit/23316dae80ab34f96276f5b261db39e1ae0c0912

and it would be used like this here: https://github.com/keychera/panas.example/blob/static-file-server/babashka-file-server/bb.edn

basically everything already works and the question is: should that change be introduced here to the main repo or should I keep that separate?

borkdude commented 1 year ago

Seems good to me. Maybe the name can be clearer? What about file-router?

keychera commented 1 year ago

That's a good idea, I didn't think much about the name. If everything else is okay, I will make a PR and close this issue

borkdude commented 1 year ago

sounds good!

keychera commented 1 year ago

closing this, PR: https://github.com/babashka/http-server/pull/5