question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use in server side apps

See original GitHub issue

I’m using (and really enjoying) matter-js as a physics engine in a MMO game with an authoritative server architecture. To achieve this I need to run the physics simulation for the world on the server as well as the clients.

At present matter-js assumes the presence of a document object which doesn’t exist within node.

To fix, I have included an extra bool option for the engine called createRenderer then wrapped the Render.create() call in a check for this property. There were also a couple of other places I needed to wrap, or return a function immediately, but once that was done everything worked perfectly.

Not sure if my solution is the best way to achieve this behaviour, but it would be a nice addition for scenarios such as mine.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:23 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
liabrucommented, May 20, 2016

You’re right, I’ll add this information to the readme shortly 👍

2reactions
liabrucommented, Mar 7, 2017

Not exactly ‘shortly’… but I’ve added a mention of support for Node.js in the readme!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-Side Apps - OAuth 2.0 Simplified
Server -side apps are the most common type of application encountered when dealing with OAuth servers. These apps run on a web server...
Read more >
Introduction to the server side - Learn web development | MDN
Server -side programming allows developers to make use of sessions — basically, a mechanism that allows a server to store information on the ......
Read more >
What do client side and server side mean? - Cloudflare
Much like with client side, 'server side' means everything that happens on the server, instead of on the client. In the past, nearly...
Read more >
Client-Side vs. Server-Side Code: What's the Difference?
Server -side processing is used to interact with permanent storage like databases or files. The server will also render pages to the client...
Read more >
Top 20 Server Side Tools You Will Love - Back4App Blog
This article will explore 20 of the best server side tools. The list include names like Back4App, Firebase, Docker, New Relic, etc.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found