# Pengine client sample using Javascript, not Prolog?

**URL:** <https://swi-prolog.discourse.group/t/pengine-client-sample-using-javascript-not-prolog/620>\
**Category:** Help!\
**Created:** [May 7, 2019, 10:40pm UTC](https://swi-prolog.discourse.group/t/pengine-client-sample-using-javascript-not-prolog/620 "2019-05-07T22:40:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prodog](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@prodog](https://swi-prolog.discourse.group/u/prodog)\
**Post date:** [May 7, 2019, 10:40pm UTC](https://swi-prolog.discourse.group/t/pengine-client-sample-using-javascript-not-prolog/620/1 "2019-05-07T22:40:18Z")

</div>

I am using SWI-Prolog 8.0.2. I have been reading about Pengine for the last few hours. I have found the Genealogy tutorial and plenty of docs, and samples for using Pengines as a client from Prolog (i.e. - The Prolog API). But I can’t seem to find any client samples showing how to interface with Pengines from Javascript. I did find the Javascript API page:

[https://pengines.swi-prolog.org/docs/documentation.html](https://pengines.swi-prolog.org/docs/documentation.html)

But not a client side code sample. Can someone point me to one?

Also, what is the underlying transport or O/S service that facilitates the RPC calls, on Windows and Linux? DDE? Sockets? HTTP? etc.

Note: in my use case Pengines will be on an Ubuntu Linux 18.04 box and _not_ available from outside the local box (i.e. - it’s server ports will _not_ be allowed through the firewall by adding a _ufw_ entry.). It’s only for internal use by the Node.JS process on the same box. I assume that means I don’t have to take extraordinary security measures to protect my Pengines instances.

---

<div class="post-metadata">

**Author:** ![Ian](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/ian/32/1026_2.png) [@Ian](https://swi-prolog.discourse.group/u/Ian)\
**Post date:** [May 8, 2019, 9:12am UTC](https://swi-prolog.discourse.group/t/pengine-client-sample-using-javascript-not-prolog/620/2 "2019-05-08T09:12:38Z")

</div>

Example in online documentation  
[http://www.swi-prolog.org/pldoc/man?section=pengine-examples](http://www.swi-prolog.org/pldoc/man?section=pengine-examples)

Examples in GIT.

> **[SWI-Prolog/packages-pengines](https://github.com/SWI-Prolog/packages-pengines/tree/master/examples/web)**
>
> Pengines: Prolog engines. Contribute to SWI-Prolog/packages-pengines development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![prodog](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@prodog](https://swi-prolog.discourse.group/u/prodog)\
**Post date:** [May 8, 2019, 1:11pm UTC](https://swi-prolog.discourse.group/t/pengine-client-sample-using-javascript-not-prolog/620/3 "2019-05-08T13:11:41Z")

</div>

Thanks Ian! That’s what I needed.
