-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I have a number of older luminus apps that run fine, but this week I created a couple new ones with the latest framework (for which the generated code is different than in the older apps) and none of them ran, even with the simplest setup. No error message or other problem indication was given. I tracked it to http-server, which logged that it had started but was not working, and I got it to work by passing a map with explicit keys from env. I realized then that HOST was set in my environment (for various reasons and not as a server host) and this was getting passed unchanged through luminus.http-server/run-options, causing problems.
I realize that I can remove the HOST environment variable before running the server, but this seems less convenient and turn-key than I think luminus wants to be. Perhaps HOST could be treated like PATH
when luminus mounts the various components. For instance, the :host option to http-server/start could be changed to something like :server-host with run-options changed accordingly:
(defn run-options [opts]
(merge
{:host "0.0.0.0"}
(-> opts
;;options contain ENV path and possibly host
;;Immutant path is found at :handler-path
;;Server host is found at :server-host
(dissoc :path :contexts :host)
(rename-keys {:handler-path :path, :server-host :host})
(select-keys
(-> #'immutant/run meta :valid-options)))))
Just a thought. Thanks.