Its a bit confusing. You (typically) do not want the pengines repo. The core functionality is part of the core distribution. To create a basic pengine server:
:- use_module(library(http/http_server)).
:- use_module(library(pengines)).
server(Port) :-
http_server([port(Port)]).
To show it operational, put the above in a file, load it and run e.g., ?- server(8000).
Now, to show it works we use the Prolog client from another terminal:
swipl
?- use_module(library(pengines)).
true
?- pengine_rpc('http://localhost:8000/', member(X, [a,b])).
X = a ;
X = b.
Now it all depends what client you to use. You can call the server from JavaScript. Then you need to load pengines.js
, which you get /pengine/pengines.js
from the pengines server. Best is to get it from there as that is guaranteed to get a file that is compatible with the server. You find several other clients at swish/client at master · SWI-Prolog/swish · GitHub
You may (but do not need to) use SWISH as your pengine server. That allows remote editing and management of Prolog scripts. That depends mostly on the role of the Prolog code plays and who is creating and maintaining that code.