Best NodeJS module for a hook-based plugin system

107 views
Skip to first unread message

justin hyland

unread,
Jan 19, 2016, 2:21:34 PM1/19/16
to nodejs
I'm looking for a module that would allow developers to code plugins for my application, based on hooks/filters. The best example I can think of would be something like the WordPress plugin system. Where you add 'tags' or 'filters' all over, and plugins can fire off functions when the tags are applied. It also has 'filters', which would basically filter some data through any plugins that add functions to that filter tag.

Keep in mind, I'm not using ExpressJS. My application is using HapiJS for the API server, and BookshelfJS/KnexJS for the ORM.

Does anyone have any recommendations for this? I was looking at Senica, which bases everything on 'patterns' instead of tags. Meaning instead of applying a 'filter' to an object based on tags or hooks, it basically just uses the object itself as the pattern.. Which is very interesting. I also found that HapiJS has a plugin specifically for Senica, called Chario. Chario basically just adds a decoration to the server which contains the Senica object. 

If someone has something better in mind than Senica/Chario for a tag/hook based plugin system.. let me know!

Thanks!
Reply all
Reply to author
Forward
0 new messages