Skip to content

Commit

Permalink
Docs and new broadcast.
Browse files Browse the repository at this point in the history
  • Loading branch information
JanWielemaker committed Dec 4, 2023
1 parent d36bac0 commit bc3f4cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server.pl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
from the shell to start the SWISH server accessible on
http://localhost:3050/
swipl run.pl
swipl run.pl [--public] [--port=Port]
@see run.pl and daemon.pl
*/
Expand All @@ -57,13 +57,16 @@
% Start the web-server on Port. Port may be unbound to make the
% system select a free port. Port can also be of the form
% `localhost:Port` to bind the server only to the localhost
% interface.
% interface. The broadcast messages are compatible with
% library(http/http_unix_daemon).

server :-
server(localhost:3050).
server(Port) :-
broadcast(http(pre_server_start)),
broadcast(http(pre_server_start(Port))),
http_server(http_dispatch,
[ port(Port)
]),
broadcast(http(post_server_start(Port))),
broadcast(http(post_server_start)).

0 comments on commit bc3f4cb

Please sign in to comment.