Closed Artesonraju closed 7 years ago
Thanks for this @Artesonraju. Apologies for taking so long getting to it.
I'm on the fence about whether this should be included in boot-http proper, because we're starting to get to the point where the number of options / option combinations is exceeding my ability to test / reason about all of them in various configurations.
How common is this use-case for you?
Would it be possible to accomplish this functionality via a generic handler that could be published separately and included in the :handler
slots by projects in need of this?
No problem. I'm not using it anymore. My use-case was a non-clojure API server, separated from the static one. It can probably be solved by an handler. Thanks for the response and for the work on this tool.
I think we'll settle for dealing with this case in custom handlers. Open to further discussion if it's a pain point for anyone, though.
Added forward functionality, to allow serving static files and forward to an API server.
Command line: boot serve -n “{:path \"/api\" :address \"http://localhost:3001\"}”
Repl: (boot (serve :forward {:path "/api" :address "http://remote.server:3001"}) (wait))
:path defaults to "/" and :address to "http://127.0.0.1"