socketstream/socketstream — pull request #254 by madscoaducom (2012-06-29 19:29:27+00:00)
Title: Allow writing of middleware and rpc responders in other languages

Hi Owen,

Thank you for creating socketstream, I really enjoy how easy it is to experiment with anything web and node.js with this framework. I have put together this pull request to extend the functionality a bit by allowing socketstream to recognize middleware and rpc responders written in languages where support is already loaded via client code formatters.

It works by passing a custom filter function to the apitree module. The filter behaves like the default apitree filter and in addition allows loading of modules with extensions that are registered in nodes require.extensions.

To share the code between the middleware and the rpc loader I moved the apitree call into the utils folder. I also added a couple of tests to cover the utils/apiTree module.

I wanted to add a couple of lines in the documentation, but I am not quite sure where it is most appropriate. One place to mention it could be as a footnote to the [Optional Modules](https://github.com/socketstream/socketstream#optional-modules-officially-maintained-and-supported) section.

I hope you find it usefull.

Mads