- Make sure you are pointing at the inner-most minesweeper-server file (there may be one inside the other if you extracted this from a zip file)
- If you are having trouble, you can delete the
package-lock.json
file and runnpm i
to re-install packages/dependencies - Install node.js / express.js
- Pull this repo and
cd
to it via terminal/command prompt - Use
npm run dev
to start the server in development mode
This is a Minesweeper inspired game that uses a node.js / express.js server to perform all of the game logic.
It's important to note that this is a server that doesn't contain any view. The view for this project is handled via a Unity3D app which you can find here
While the code is fairly well documented, here's what you need to know to get started
- All routes are found in
/routes
folder - Each folder beneath
/routes
has a folder that contains anindex.js
file with the route itself - The data/game state is stored in
gameData.js
- The logic is performed by
gameLogic.js
- Due to https/SSL certificate issues, this project currently uses
GET
requests instead ofPOST
. There are ways around this by generating your own .csr file - but since I wanted this to be a plug-n-play demo with no lengthy setup process, I chose to go withGET
. Know that this is not best practice and should be avoided for a production app