This is an approach to provide a web application to play around with Metafactures languages Fix and Flux inspired by the JSON-LD Playground. This project is inititially created using the leiningen re-frame template.
The current test deployment is available at http://test.lobid.org/playground/
Before starting you need to install Leiningen and a JDK (minimum Java 8).
General setup on Unix (see https://leiningen.org/ for other options):
mkdir ~/bin
wget -O ~/bin/lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
chmod a+x ~/bin/lein
This project depends on metafacture-core and metafacture-fix. Clone and install both repositories (branch oersi).
Clone and install metafacture-core:
$ git clone --branch oersi https://github.com/metafacture/metafacture-core.git
$ cd metafacture-core
Unix:
$ ./gradlew install
Windows:
$ .\gradlew.bat install
Clone and install metafacture-fix:
$ git clone --branch oersi https://github.com/metafacture/metafacture-fix.git
$ cd metafacture-fix
Unix:
$ ./gradlew install
Windows:
$ .\gradlew.bat install
$ git clone https://github.com/metafacture/metafacture-playground.git
$ cd metafacture-playground
When using development mode you don't have to restart when changing files. They will be reloaded automatically.
lein watch
Wait a bit, perhaps 20 seconds, keeping an eye out for a sign the compile has finished, then browse to http://localhost:8280.
To compile and build the frontend run:
lein release
Then start the server with:
lein run
Browse to http://localhost:3000.
Run workflows on the web server, passing data
, flux
, and fix
:
Install karma and headless chrome
npm install -g karma-cli
Point to your Chrome binary, e.g.
export CHROME_BIN='/usr/bin/chromium-browser'
And then run your tests
lein watch
And in another terminal:
karma start
Run
lein test
Run workflows on the web server, passing data
, flux
, and fix
as GET-Parameter: