Is this still the best way to interface with SWI-Prolog from a Node.JS app?

#1

I have a few questions about interfacing with my SWI-Prolog app from my Node.JS app. Just to be clear, my SWI-Prolog app will be acting as an API server only. It will not be serving up any web content. It will only be receiving pure text content and returning plain text content in response.

  1. Is this still the best example and the best way of interfacing with SWI-Prolog from a “foreign” app?:

http://www.swi-prolog.org/howto/http/

If not, please link me to the best document or the best sample that shows me how to do this quickly. I’m assuming that using SWI-Prolog as web service as indicated by the linked document is the best way to integrate a Node.JS app. But if there’s a superior way that’s even easier (socket? etc.), please let me know.

NOTE TO JAN: The link in this paragraph to the SWI-Prolog found on the above page is broken. Note the %2C in the link.:

One is the server that runs http://www.swi-prolog.org, which can be downloaded through GIT from the repository plweb.git.

  1. Any tips or caveats I should know about that could save me from making common mistakes or bad design decisions? Note, the Node.JS app and SWI-Prolog server will be running on the same server for now. I don’t see that changing in the future but I could be wrong.

  2. Up until now, I’ve only run SWI-Prolog on a Windows box. I’ll be running it soon on an Ubuntu 18.04 Linux box since I use Linux for deployments and Windows for development when it comes to SWI-Prolog. Is it easy to install SWI-Prolog on Linux? Anything I should know about prerequisite libraries I should apt-get install before trying to run it? Any other tips for that platform?