我不知道如何配置我的immutant安裝提供網頁如何immutant被配置成服務除localhost(127.0.0.1)以外的IPS
當我這樣做:
>> lein immutant run
>> curl http://127.0.0.1:8080/testing
它的工作原理,但是
>> curl http://172.20.10.3:8080/testing
這是在我的電腦上替代ip沒有。
我們在哪裏可以配置此選項?它使用
我不知道如何配置我的immutant安裝提供網頁如何immutant被配置成服務除localhost(127.0.0.1)以外的IPS
當我這樣做:
>> lein immutant run
>> curl http://127.0.0.1:8080/testing
它的工作原理,但是
>> curl http://172.20.10.3:8080/testing
這是在我的電腦上替代ip沒有。
我們在哪裏可以配置此選項?它使用
ANKUR接近正確 - Immutant結合默認爲localhost,所以你需要用-b
選項指定不同的綁定地址。指定0.0.0.0
將綁定到每個接口,但不會將端口傳遞給-b
。因此,正確的調用將是:
lein immutant run -b 0.0.0.0
運行:
lein immutant run -b 0.0.0.0:8080