Setting up a Web client
On this page
If you want to easily demonstrate a couple of SPARQL queries on a Web page, or if you want to show off your custom built Comunica engine, then you can do this using the Comunica jQuery widget.
As an example, a public instance of this widget is available at http://query.linkeddatafragments.org/.
Since Comunica runs on Node.js, make sure you have Node.js installed on your machine.
Next, we can clone the Comunica jQuery widget repo, and install it:
$ git clone https://github.com/comunica/jQuery-Widget.js.git $ cd jQuery-Widget.js $ npm install
2. Starting the built-in Web server
The widget comes with its own (optional) Web server, which can be started as follows:
$ npm run dev
Now, you page will be live at
--portoption within the
3. Building a static Website for production
You can build a production-ready version of this page as follows:
$ npm run build
The contents of the
build folder can now be deployed on to any Web server.
4. Changing the default queries and datasets
You'll notice that the page contains some example queries and datasets by default.
You can change these by modifying the contents of the
queries/ folder and the