Wednesday 26 July 2017

Best way to use Typescript with node & browsers

I've been working on a game as a hobby on and off for about a year now and it's finally come time to implement the multiplayer aspect of it.I've managed to get a simple Node server up and running and send messages between the server & clients.I'm using TypeScript on the client without issues, but issues arise when I put client & server code in the same project.On the clientside so far I've been using RequireJS with ES6 imports and it's been working great.. But this seems incompatible with Node's own Require function, and TypeScript complains. I've also tried Browserify & SystemJS without much luck.The client and server will essentially be separate apps, but will need to share common data - Enums, Interfaces, cfg, etc.Does anyone have any ideas, examples, or tutorials that would help me in this matter?Thanks for your time!

Submitted July 26, 2017 at 11:57AM by drummer_si

No comments:

Post a Comment