Giter VIP home page Giter VIP logo

lpn-swish-proxy's Introduction

LPN proxy server

This repository provides the SWI-Prolog sources for a proxy server for Learn Prolog Now! which rewrites the sources to embed SWISH, the SWI-Prolog web shell. The modified version of Learn Prolog Now is hosted at lpn.swi-prolog.org

The current version is merely a proof of concept. It identifies verbatim environments in the Learn Prolog Now HTML and classifies these as source code or example queries. It notably is not (yet) very good at discovering the relations between source fragments. Most of the infrastructure to improve on that is already in place: sources and queries are parsed and analysed for predicates they implement and require.

Prerequisites

You will need to install SWI Prolog version 7 or greater for this to work. To check, run this:

% swipl --version

Run locally

% swipl proxy.pl
?- server(8080).

Use local server at port 8000 rather than www.learnprolognow.org:

% swipl proxy.pl
?- local.
?- server(8080).

Use local SWISH at port 3050 rather than swish.swi-prolog.org

?- local_swish(3050).

Run as daemon

As current user

% ./daemon.pl --port=8080

As defined user

% sudo -u www-data ./daemon.pl --port=8080

Or on port 80:

% sudo ./daemon.pl --user=www-data

Enable caching

Create a directory cache and make sure it is writeable by the server. If no such diretory exists, all pages are fetched dynamically.

% mkdir cache
% sudo chgrp www-data cache
% sudo chmod g+w cache

lpn-swish-proxy's People

Contributors

janwielemaker avatar anniepoo avatar isra17 avatar stevegt avatar ylc015 avatar siddhantarya avatar

Watchers

Tadeusz Kurpiel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.