Search code examples
clojureimmutant

how can immutant be configured to serve ips other than localhost (127.0.0.1)


I'm not sure how to configure my immutant installation to serve webpages

when I do:

>> lein immutant run 

>> curl http://127.0.0.1:8080/testing

it works, but

>> curl http://172.20.10.3:8080/testing

which is an alternative ip on my computer does not.

Where can we configure this option?


Solution

  • Ankur is close to correct - Immutant binds to localhost by default, so you need to specify a different bind address with the -b option. Specifying 0.0.0.0 will bind to every interface, but you don't pass a port to -b. So, the correct invocation would be:

    lein immutant run -b 0.0.0.0