# Embedding Swish Inside another Web Application

**URL:** <https://swi-prolog.discourse.group/t/embedding-swish-inside-another-web-application/4970>\
**Category:** Help!\
**Tags:** bug, swish, discussion, how-to\
**Created:** [February 2, 2022, 4:38pm UTC](https://swi-prolog.discourse.group/t/embedding-swish-inside-another-web-application/4970 "2022-02-02T16:38:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LSW](https://avatars.discourse-cdn.com/v4/letter/l/ecc23a/32.png) [@LSW](https://swi-prolog.discourse.group/u/LSW)\
**Post date:** [February 2, 2022, 4:38pm UTC](https://swi-prolog.discourse.group/t/embedding-swish-inside-another-web-application/4970/1 "2022-02-02T16:38:19Z")

</div>

**Context**

I’m using:

- SWI-Prolog version: Threaded, 64 bits, Version 8.2.4
- Swish: latest commit: d357234613182abcc2953d5b827d367616be8502

I want the code to:

- Run Swish in parallel to another web application, also using thread\_httpd and http\_dispatch.

**Message**

Hello members of the SWI-prolog community,

I’m new to prolog in general, and have been building an SWI-prolog application, who’s front-end is a web application. I have been using the thread\_httpd and http\_dispatch libraries to create the handlers neccessary to run this web application.

I have found Swish an extremely useful tool, and want it to run alongside the my current program; this will allow structures inside my application to be interacted with in Swish- and vice versa.

What is the reccomended practice for this?

Additionally, I wasn’t sure whether to track this as a full bug, but I tried converting swish’s _run.pl_ file to a module, exporting the _run\_swish_ predicate, which I included into my program’s own start-up script. On running this, however- I was met with a syntax error much further down the execution process on runtime:

> ERROR: c:/users/127890866/documents/github/orm/extensions/swish-master/lib/page.pl:91:20: Syntax error: Operator expected

Which, when traced looks like so:

 ![image (1)](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/2/2658f552f9544a9adc2a45f38e7039427aa46c91.png)

I have not modified the operator precidence of the “/” or “//” characters so am not sure what’s causing this.

I hope everyone’s well.

Cheers.
