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

700 views Asked by At

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?

2

There are 2 answers

0
Toby Crawley On BEST ANSWER

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
0
Ankur On

Run it using:

lein immutant run -b 0.0.0.0:8080