Example Uses

The server can be run with either JavaScript where it will use the library node:http, or Python where it will use the library http_server or Java where it will use the library jdk.httpserver. We chose port 8084 to run the HTTP server:

main :-
http_server_new(S),
http_server_on(S,'request', [P,Q], dispatch(P,Q)),
http_server_listen(S, 8084).

After starting the server one can point the browser to the following URL:

http://localhost:8084/moon.cgi

The browser will show something along:

 
Picture 1: Hypertext Document shown by the Moon Server

Kommentare