Simple realtime platformer build with Phaser 3, Socket.io, ExpressJS & Webpack 4.
- Git clone this repository
- Create in the server folder a file called config.js
- Add the following code to the config.js file:
//CLOUD.MONGODB.COM DEVELOPMENT SETTINGS // TIP: Create free online MongoDB Cluster at: https://cloud.mongodb.com/ const USERNAME = "YOUR_MONGODB_USERNAME"; const PASSWORD = "YOUR_MONGODB_PASSWORD"; const HOST = "your-host-url.mongodb.net"; const PORT = "27017"; const DB = "realtime-pusher-game"; module.exports = {USERNAME, PASSWORD, HOST, PORT, DB};
- Run the command
npm install
in the client folder. - Run the command
npm install
in the server folder. - Run server.js with
node server.js
in the server folder. - Run the Webpack server in client folder with the command:
npm start
. - Go to http://localhost:8080/