Closed hbpoison closed 8 years ago
Sorry for the lack of response, been away for a few days. Will look tonight! Cheers!
This is certainly something that is on my todo list, thanks for the contribution.
However, it changes the public API exposed by the library. Although I havent implemented test cases yet (sorry about that, most unhelpful I know) I'm basically using a test repo, any PR would certainly have to run there. The npm start
command in that repo uses nvm, if you're not using that (or have a different version of 0.11) then alter bin/start
to get it going. It's a pretty straight-forward chat application, nothing incredible but I think it uses most of the API defined in 0.3.0.
One thing that does immediately strike me, any namespace implementation would probably have to be transparent, so that socket.on( ... )
would work seamlessly without knowledge of the underlying architecture. Should be simple enough to just expose the default '/'
route for this purpose and maintain the defined API whilst adding namespace support should you need it in whatever app you're using koa-socket
in. I certainly wouldnt want namespacing to be mandatory.