Closed yuis-ice closed 4 years ago
solved.
I changed server.pl as following
server(Port) :-
socket_server_open('127.0.0.1':Port, Socket),
accept_loop(Socket).
server(Port) :-
socket_server_open('0.0.0.0':Port, Socket),
accept_loop(Socket).
and scryer-prolog -g "server(6012)" server.pl
as usual
Thank you for this workaround!
I have added 759057f20e0304f23780ddbf20a61a93c15e25da so that the IP can also be specified on the command line, please have a look!
I'd like to run your book from docker for a reason. and I need to access it from external browser, like 192.168.0.183:6022/prolog., not localhost:6022/prolog. while running the command
scryer-prolog -g "server(6012)" server.pl
, it looks it is running on localhost, as below lsof output. so I'd like to know is there some way to runscryer-prolog -g "server(6012)" server.pl
with specified 0.0.0.0 IP address. Thanks.