pandeiro / boot-http

A simple HTTP serve task for the Boot build tool
62 stars 34 forks source link

Add option to listen on localhost instead of any #33

Open amatus opened 8 years ago

amatus commented 8 years ago

Better yet, add the ability to pass arbitrary options to jetty to enable things like SSL too (#30).

SevereOverfl0w commented 8 years ago

For me, it listens on localhost, do you mean the other way around?

amatus commented 8 years ago
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp6       0      0 :::8000                 :::*                    LISTEN      12573/java    
pandeiro commented 8 years ago

Sorry for not responding earlier. I agree this would be nice. What would the API look like?

drownbes commented 7 years ago

Is there any way to bind it to another than localhost address? Is the project dead? Any alternatives to it?

Chris-Andrews commented 7 years ago

Hey @drownbes: the project is not dead. There is not currently a way to bind to an address other than localhost, but this should be possible to add. As mentioned above, we just need an idea of what the API should look like. I'd suggest possibly adding options like:

k httpkit              bool "already exists and provides option to use httpkit instead of jetty"
K httpkit-config  edn "exposed httpkit config options"
J jetty-config      edn "exposed jetty config options"

The httpkit-config and jetty-config could allow for more complicated things like SSL as @amatus describes above. Alternatively we could simply add the option to use another address as -a address STR or -i ip STR. Exposing both the address and config options would probably be fine as well. I can try to tackle this if it would be useful to people, but would just need to know what @pandeiro thinks about the API options.