Guides  ›  Plugins  ›  Use a plugin ← PREV NEXT →

Use a plugin

Access registered plugins from handlers, middleware, or hooks.

// app/pages/home.js
module.exports = {
  paths: '/',
  handler: function (state) {
    return state.plugins.greeting.hello('Jack')
  }
}

This uses the plugin from Create a plugin. Plugins are shared by requests in a worker; put request-specific values in state.data.

Next: Connect →

Tools for business systems.