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 <
[email protected]> wrote:

> 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, and the server would verify the legality of a requested
> move, thus they both need a way to enumerate valid moves.
>
> But how can I do this when using Node.js ?
>
> Building a module with 'module.exports' and 'require' will mess up the
> client side, and having just plain JavaScript won't work with Node
> because something will have to be exported from the file (am I
> wrong ?).
>
> So, how would you go about having shared code between Node.js and the
> client side ?
>
> Best,
> Robert
>
> --
> 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 subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
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 subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to