The goal of this project is to implement a multiplayer game using Socket.IO
, ExpressJS
and Phaser 3
.
-
Open a terminal and navigate to
socketio-express-phaser3
root folder -
Execute the command below if you are running it for the first time
npm install
-
Run the following command to start the game server
node server.js
-
Open a browser and access http://localhost:5000
-
The GIF below shows two users playing at the same time
-
While the server is running in one terminal, open another terminal and run the following command
ngrok http 5000
-
Share the
Forwarding
url with your friends... Forwarding http://cf...0a.ngrok.io -> http://localhost:5000 Forwarding https://cf...0a.ngrok.io -> http://localhost:5000 ...
-
In a terminal, make sure you are in
socketio-express-phaser3
root folder -
Run the following commands
npm upgrade npm i -g npm-check-updates ncu -u npm install