hello_world.pl 187 Bytes
Newer Older
Paul's avatar
Paul committed
1 2 3 4 5 6 7 8 9 10 11 12
:- module(hello_world,
    [ serve/0
    ]
).

:- use_module(library(sw/simple_web)).

sw:route('/', _Request) :-
    reply_html("<h1>Hello, world!</h1>").

serve :-
    run(port(8000)).