You need to clone this repository to get access to the command line examples.
exist-ls
list the contents of a collection in eXist-dbexist-tree
list the contents of a collection in eXist-db as a treeexist-upload
upload a files and folders to a collection in eXist-dbexist-install
upload and install a package into eXist-dbexist-exec
execute queries in an eXist-db
NOTE: These scripts connect to a running eXist-db instance and XML-RPC has to be enabled.
The command line scripts allow you to connect to any instance that has XML-RPC enabled. By default they will attempt to connect to a local development server with default passwords.
Override any of the default connection parameters by setting environment
variables prefixed with EXISTDB
. In the following table you see a list of the
parameters with their default values and a description.
variable name | default | description |
---|---|---|
EXISTDB_USER |
admin |
the user used to connect to the database and to execute queries with |
EXISTDB_PASS |
empty | the password to authenticate the user against the database |
EXISTDB_SERVER |
https://localhost:8443 |
the URL of the database instance to connect to (only http and https protocols are allowed) |
dotenv(-cli) is a small script that allows you to read environment variables from a file in the filesystem.
-
Install dotenv-cli globally
npm install -g dotenv-cli
-
create .env file in a folder with the settings that you need
EXISTDB_USER=admin EXISTDB_PASS= EXISTDB_SERVER=http://localhost:8080
prepend command line script with dotenv
in the folder you created the .env file in
You need to clone this repository, then
dotenv spec/examples/exist-ls /db/apps
That also works when running the tests (on a remote server maybe or a different user)
dotenv npm test