Skip to content

actionhero/ah-sample-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ah-sample-plugin

CircleCI

I am a simple sample plugin for actionhero. I don't do much, as I am just an example. I will add timing information to each action, using a response key defined in a new config file. If api.config['ah-sample-plugin'].timingKey = delta, all actions would now have response.delta.

Install

npm install ah-sample-plugin --save

Then add it to your project's ./config/plugins.js:

exports['default'] = {
  plugins: (api) => {
    return {
      'ah-sample-plugin': { path: __dirname + '/../node_modules/ah-sample-plugin' }
    }
  }
}

Create a new config file, ./config/ah-sample-plugin.js:

exports.default = {
  'ah-sample-plugin': (api) => {
    return { timingKey: 'delta' }
  }
}

About

A sample actionhero plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published