actionhero
Version:
The reusable, scalable, and quick node.js API server for stateless and stateful applications
18 lines (14 loc) • 413 B
text/typescript
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;
}
}