Comment on page
Components can be easily added by adding a new top level element to your
The configuration comprises two values:
- component name - can be anything, as long as it follows valid YAML syntax.
- package - a reference to your component.
Under the hood HarperDB is calling npm install on all components, this means that the package value can be any valid npm reference such as a GitHub repo, an NPM package, a tarball, a local directory or a website.
package: HarperDB-Add-Ons/package#v2.2.0 # install from GitHub
package: harperdb # install from NPM
package: /Users/harper/cool-component.tar # install from tarball
package: /Users/harper/local # install from local path
package: https://harperdb-component # install from URL
When HarperDB is run or restarted it checks to see if there are any new or updated components. If there are, it will dynamically create a package.json file in the
rootPathdirectory and call
NPM will install all the components in
The package.json file that is created will look something like this.
The package prefix is automatically added, however you can manually set it in your package reference.
To add a component using the operations API use the
Another option is to pass
deploy_componenta base64-encoded string representation of your component as a
.tarfile. HarperDB can generate this via the
package_componentoperation. When deploying with a payload, your component will be deployed to your
<ROOTPATH>/componentsdirectory. Any components in this directory will be automatically picked up by HarperDB.