struts
no apache here
Description
struts provides back support for modular Node.js-powered microservices. A struts-powered project is arranged in a hub-spoke pattern with an EventEmitter (or equivalent) module in the center with various worker/handler modules around it. struts provides the boilerplate so that worker/handlers are as simple as possible.
Usage
Hub-and-Spoke
struts provides a simple base class called Handler which facilitates a hub-and-spoke pattern using a central EventEmitter. The goal is to keep the various components/handlers DRY by providing as much boilerplate in the Handler base class as possible.
let struts = ; Handler // // init is called by struts constructor so user doesn't have to // call super() // { // all events go through hub, which is this.emitter thisemitter // this.options is set by struts construtor thisoptionssomeParam = thisoptionssomeParam || 5; } // // user-defined members can take advantage of struts-provided boilerplate for // eventing, logging, and error handling // { thisemitter; this; this; this; } { this options; // handlers ... }