[nodejs] Sharing code between client and server

2012-05-08 Thread Robert Chris Bang Larsen
Hi all I am planning on using Node.js for the server side of multiplayer games based on JavaScript and HTML5. I used to use Java for this and much code could be shared between client and server, for instance most of the game model. A Backgammon client would show the user which moves were legal, an

[nodejs] Sharing code between client and server

2012-05-08 Thread P. Douglas Reeder
Mojito from Yahoo supports this (but I haven't used it myself). I believe you need to use YUI for your widgets with Mojito. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are su

Re: [nodejs] Sharing code between client and server

2012-05-08 Thread Rob Ashton
See browserify requirejs stitch everything else under 'module loader' There is a thread somewhere a week or so ago with a list of these in them, I personally just use RequireJS even though it isn't cool On Tue, May 8, 2012 at 11:05 AM, Robert Chris Bang Larsen < rob...@komogvind.dk> wrote: > Hi

Re: [nodejs] Sharing code between client and server

2012-05-08 Thread Axel Kittenberger
In my project a typical structure of a file shared between client and server looks like this. This avoids using any precompilers for client side in development, thus you get useful error messages with linenumbers just as they are. It uses shared globals on browser javascript and proper requires fo

Re: [nodejs] Sharing code between client and server

2012-05-09 Thread Azer Koçulu
I would recommend OneJS (http://github.com/azer/onejs) since it's a better implementation of commonjs and lets you separate your client-side project as an independent commonjs package. I built multiplayerchess.com using onejs last year. You may want to take a look at its source code: http://github.

Re: [nodejs] Sharing code between client and server

2012-05-16 Thread Davis Ford
On Tue, May 8, 2012 at 5:05 AM, Robert Chris Bang Larsen wrote: > Hi all > > I am planning on using Node.js for the server side of multiplayer > games based on JavaScript and HTML5. > > But how can I do this when using Node.js ? > > So, how would you go about having shared code between Node.js and