fabrix-app / fabrix

Strongly Typed Modern Web Application Framework for Node.js and Browsers
Other
107 stars 5 forks source link

feat(): spool lifecycles should be configurable from core #47

Open scott-wyatt opened 4 years ago

scott-wyatt commented 4 years ago

lifecycle

Currently, each spool contains a spool.ts file that sets up it’s lifecycle. There is no way to override this if imported and that has always bothered me. There’s got to be a good way to allow configuration of a lifecycle from the root app as an override. The configuration merging is done before the lifecycle starts anyways.

jaumard commented 4 years ago

What would be a good use case for this ? because normally what is configured under spool.ts is what the spool need to work correctly, so what's the point of overriding it ?

scott-wyatt commented 4 years ago

One example is spool-realtime, it has no way of knowing which webserver you are going to use, so it can’t listen/wait fo either hapi or express, or maybe some other webserver or even multiple servers without a PR. But if the app developer could write their own definition, then that would be a solution. It’s kind of a fabrix anti-pattern for supplimental spools that work with a variety of other spools.

Also, this would be needed for remote configuration For if/when we distribute fabrix i believe.

On Oct 27, 2019, at 11:31 AM, Jaumard notifications@github.com wrote:

 What would be a good use case for this ? because normally what is configured under spool.ts is what the spool need to work correctly, so what's the point of overriding it ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.