basex - A BaseX client for node.js
BaseX is a very light-weight, high-performance and scalable XML Database engine and XPath/XQuery 3.0 Processor, including full support for the W3C Update and Full Text extensions. Built as a lightweight Java server, BaseX also supports XSLT, Webdav and RestXQ.
Installing the BaseX Node client
To install with npm:
npm install basex
$ mkdir myprojectcd myproject$ npm install firstname.lastname@example.org ./node_modules/basex
Once BaseX is installed and the BaseX server is running, test it.
$ cd examples/$ node Example.jsmilliseconds: 0
- Java is required
- Download and install BaseX (tested against version 8.6)
See commands.md in the docs folder for details of the API.
mocha -R spec test/Execute info command✓ should not error✓ should have replySend an valid xquery statement: 2+2✓ It should not error✓ It should equal 4Send an invalid command: 2+✓ It should errorCreate a database✓ It should not errorAdd a document✓ It should not errordrop db database✓ It should not errordrop db database✓ It should not errorSend a xquery and iterate over the result items✓ It should not error✓ It should return an arraycreate query and bind✓ It should not error✓ It should return a string13 tests complete
js-beautify -r index.js
Documentation is generated using
jsdoc -r -d docs --verbose index.js
Anyone is welcome to submit issues and pull requests
- stream i/o