asyncapi/nodejs-template

Refactor handlers to separate business logic from generated template

Closed this issue · 2 comments

Reason/Context

The current nodejs-template can just be generated once. Let's say post generation we add some business logic and then make some changes in the asyncapi file and re-run the generator, our business logic will be overriden.
We have to therefore separate the handlers from the generated template to solve this issue.
WORKING POC: https://github.com/kaushik-rishi/poc-template-aim/blob/master/test.js#L27

Previous Discussions

asyncapi/generator#582 (comment)

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Has been implemented through - #220