As of ActionHero version
v8.0.0, you can create and include plugins for you ActionHero project. Plugins are collections of
initializers that are collected as a module. You can install plugins via NPM or keep them in a local path.
Plugins are loaded after all local ActionHero project files, but initializers follow the same priority scheme as all other initializers.
/ | - actions | - tasks | - servers | - initializers | - scripts | - config | | - package.json
To create a plugin, create a project with the following structure:
This structure will allow elements to be loaded into ActionHero (we search
/actions for actions,
/tasks for tasks, etc)
When developing your plugin locally, you can load it into an existing ActionHero project to test it out.
First, add the path your plugin is in to
api.config.general.paths.plugin. If your ActionHero app is in
/var/ah/actionhero and your plugin is in
Please use the npm naming convention
ah-(name)-plugin when uploading your plugin to npm
When creating plugins, you may find yourself wanting to do things which could normally be accomplished easily with a "top level" ActionHero project, but might be difficult from within the
node_modules folder. Here are some helpers:
api.routes.registerRoute(method, path, action, apiVersion, matchTrailingPathParts)
You can view a list of plugins maintained by @l0oky via