Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :- use_module(library(http/thread_httpd)).
- :- use_module(library(http/http_dispatch)).
- :- http_handler(root(.), index_write, []).
- index_write(Request) :-
- format('Content-type: text/html~n~n', []),
- format('<html>~n', []),
- format('Hello World~n'),
- format('</html>~n', []).
- :- initialization
- http_server(http_dispatch, [port(8080)]).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement