https://github.com/medikoo/modules-webmake

It works, it's fast, Currently I'm building all client/server web 
applications with that (on average I have 60% of modules shared between 
server and client)

On Tuesday, May 8, 2012 11:05:26 AM UTC+2, 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. 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

Reply via email to