#JSONiq Query Examples for MongoDB
##Configure & Run In order to run these examples, you need to create an account on http://28.io. You also need to install the 28 CLI tool:
$npm install 28 -g
$28 login your@email.comYou can then edit the mongodb-config.json file with the credential of your own MongoDB.
To create a project and attach your MongoDB:
$28 projects create my-project
$28 datasources set my-project -c mongodb-config.jsonTo upload the queries:
$cd queries/
$28 upload my-projectTo run a query:
$cd queries/
$28 run my-project public/top_contributors.jqJSONiq Development
The Atom and Cloud9 editors have great support for JSONiq. The Atom extension for JSONiq is available here.
The 28 watch command will deploy your queries to 28.io everytime they are updated locally.
$cd queries/
$28 watch my-projectFor continuous integration, there is a gulp task to perform static code analysis on your queries: gulp-xqlint. And example of integration between 28.io and gulp is available here.