On Feb 2, 2015, at 7:47 PM, Shao Tian wrote:
>
> Is there any way to implement plugin system in Node.js like the one in Atlassian JIRA?
I am not familiar with Atlassian JIRA...
> For example, I may have a main page for displaying all the plugins. Each plugin is like an independent web app, containing both html and node.js backend code.
> If I select one plugin in the main page, the main page is able to render the html of corresponding plugin, and all the http requests from the plugin html are
> handled by the node.js code of the plugin. Thus the main page is just a container of bunch of plugins.
>
> I know that with npm we can have modules, but I thought modules can contain only javascript code? what about html, static files like images?
It's not node's job to do any of that. You can certainly use node to program a web framework that supports plugins -- or someone else may already have done so (search npm) -- but node itself is not a web framework and does not include such functionality.