How To: SocketStream with requirejs-based client code

50 views
Skip to first unread message

Klaus Baumecker

unread,
Jun 12, 2014, 6:24:13 AM6/12/14
to socket...@googlegroups.com
I'm starting an application based on SocketStream. So far I'm happy with the result.
Now I'm trying to leverage a fairly large amount of client code componentized with requirejs.
SocketStream on the other hand adopts the nodejs module approach with require. Now I'm stuck because I don't want to rewrite all my client code.
Following the initial discussion in this forum about AMD, I learned that requirejs supports running on nodejs, which is a similar problem to mine.

Has someone else encountered this case and eventually found a solution for it?

Regards,
klaus

Paul Jensen

unread,
Jul 5, 2014, 12:50:15 PM7/5/14
to socket...@googlegroups.com
Hi,

Apologies for the long delay in replying to this thread.

At this point in time, there isn't any support for using RequireJS with SocketStream. SocketStream uses a fork of Browserify to handle client-side code loading.

This is one of many changes that need to be made to SocketStream.

Regards,

Paul Jensen

Henrik Vendelbo

unread,
Nov 6, 2014, 11:19:02 AM11/6/14
to socket...@googlegroups.com
I think that it is a mistake to try to become a kitchen sink. It is possible to turn AMD into CJS, so while it sucks not having functionality out of the box, it should be left up to others to make an adaption like that.

IMO the main advantage of Socketstream is that it is a fairly minimal starting point combining a streaming and and a bundle delivery server with a lot of injection points. It seems that all that is needed here is documentation on how to send code to the client.
Reply all
Reply to author
Forward
0 new messages