UNPKG

actionhero

Version:

actionhero.js is a multi-transport API Server with integrated cluster capabilities and delayed tasks

18 lines (14 loc) 413 B
import { api, Initializer } from "../../../../src/index"; export class PluginInitializer extends Initializer { constructor() { super(); this.name = "pluginInitializer"; } async initialize() { api.pluginInitializer = { here: true }; } async stop() { // this seems silly, but is needed for testing, as we never clear properties on the API object delete api.pluginInitializer; } }