Demo of using PeerJS for real-time peer-to-peer networking in a Phaser game.
Open this page in two different browser windows (optionally on different devices). In the first one, press "host". In the second, press "join". The host of a game can also join their own session, but they effectively run headless by default. If everything is working, all players should be able to see real-time updates on the cursor location of every other player.