GettingStarted - xokomola/origami GitHub Wiki
Getting started
Choose one of the recipes below.
- a demo app including Origami examples
- start your own app
- no thanks, just give me the XQuery module
Of course, you can also download and assemble all the parts yourself but these recipes probably provide the easiest way to get you started.
Recipe 1: Origami demo app
git clone https://github.com/xokomola/origami-app.git
cd origami-app/webapp
git clone https://github.com/xokomola/origami.git
cd ..
gradlew gui
To run all tests
gradlew xqtest
Recipe 2: Origami + BaseX application skeleton
git clone https://github.com/theapsgroup/basex-gradle-starter.git xqapp
cd xqapp/basex/webapp
git clone https://github.com/xokomola/origami.git
cd ../..
gradlew httpstart
open http://localhost:8984/
To also add the origami examples. Note that these need some more attention and may or may not work for you.
cd xqapp/webapp
git clone https://github.com/xokomola/origami-examples.git
cd ../..
To run all tests
gradlew xqtest
Recipe 3: Just the Origami module
git clone https://github.com/xokomola/origami.git
Importing the Origami XQuery module
Assuming your own code lives in a subdirectory of webapp
add the
following to import Origami into your own module.
xquery version "3.1";
import module namespace o = 'http://xokomola.com/xquery/origami'
at '../origami/origami.xqm';