This repository contains a basic structure and files for a server based phaser.js game.
# app/
This is going to be where all the server application code lies.
# gameObjects/
Game objects for the game from a server perspective.
# utils/
Any additional utility functions we need for our application.
# gameManager.js
Main game class file.
# auth/
All the authentication is handled within here.
# models/
MongoDB Related database models.
# public/
This is the client folder / public server folder
You could potentially move this into its own project and point to the server for multiplayer games.
# routes/
All the routes will be handled within this folder.
On both root and /public folder.
npm install
Copy the .env.example in both the root and /public and populate as needed.
cp .env.example .env
In the root directory.
npx nodemon app.js --exec babel-node
cd /public && npx webpack --mode production
The /public folder can also be segmented away as a standalone client, if needed.