Hello! NExp (Node Experience) is a boilerplate for Node, which makes use of a Hexagonal architecture, in addition to all the power of TypeScript that combined allow a perfect cohesion thus achieving a clean and at the same time very powerful implementation.
📜 Description
Bring back EventHandler from shared experience and refactored as an injectable dependency
🧪 Accept Criteria Tests
Once inyected the dependecy should work as a singleton dependecy Should execute eventhandler correctly
Manual test: -new event registration: -create a dummy event:
set it at index.js
inject the dependecy on SaveItemUseCase at the contructor:
this.eventHandler = DependencyInjector.inject<IEventHandler>('IEventHandler');
and execute the dummy event at any momento of the handle funcionthis.eventHandler.execute('CreateItemEvent', {})
a console.log result shows on the console indicating the event was succesfully emmited and executed
🔮 Last Notes
📋 Author Checklist
📋Reviewer Checklist