Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

kuzzle-core-plugin-boilerplate

Here, you'll find the boilerplate to start coding a new Kuzzle Core Plugin. A Core Plugin allows you to

The boilerplate demonstrates each feature of a Core Plugin.

Get trained by the creators of Kuzzle

Train yourself and your teams to use Kuzzle to maximize its potential and accelerate the development of your projects.
Our teams will be able to meet your needs in terms of expertise and multi-technology support for IoT, mobile/web, backend/frontend, devops.
👉 Get a quote

Plugin development

This plugin is useful only if you use it as the starting point of your work. It's a boilerplate.

On an existing Kuzzle

Clone this repository locally and make it accessible from the plugins/enabled directory relative to the Kuzzle installation directory. A common practice is to put the code of the plugin in plugins/available and create a symbolic link to it in plugins/enabled.

Note. If you are running Kuzzle from within a Docker container, you will need to mount the local plugin installation directory as a volume in the container.

Please refer to the Guide for further instructions on how to install Kuzzle plugins.

On a pristine Kuzzle stack

You can use the docker-compose.yml file included in this repository to start a development-oriented stack to help you creating your custom Kuzzle Core plugin.

Clone this repository locally and type:

$ docker-compose up

This command will start a Kuzzle stack with this plugin enabled. To make development more confortable, a watcher will also be activated, restarting Kuzzle every time a modification is detected.

Note: depending on your operating system, you may get ENOSPC errors due to the file watcher. This is due to a sysctl restriction, and can be alleviated by applying the following command prior to starting the docker stack:

$ sudo sysctl -w fs.inotify.max_user_watches=52428

Working on a different Kuzzle tag

You can choose to work on the Kuzzle development branch by defining the following environment variables before launching docker-compose:

$ export KUZZLE_DOCKER_TAG=2.4.2
$ docker-compose up

These environment variables enable you to specify any existing build tag available on Docker Hub.

Customizing the plugin instance name

You may want to choose a plugin name rather than using the default one. To do so, edit the manifest.json file at the root of this repo and change the name property to your convenience.

manifest.json file

The manifest.json file is here to provide a description of your plugin to Kuzzle:

{
  /**
   * This is metadata to describe your plugin
   */
  "name": "name-of-your-plugin",

  /**
   * Define what Kuzzle version this plugin is designed for.
   * Use semver notation to limit the range of supported Kuzzle versions.
   */
  "kuzzleVersion": ">=2.1.0 <3.0.0"
}
You can’t perform that action at this time.