Skip to content

A clone of the 2048 game developed in React as a web app with additional features.

License

Notifications You must be signed in to change notification settings

ziang-feng/React-2048-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React 2048 Game

This is a clone of the 2048 game developed in React as a web app, with additional features: signup/signin, additional board sizes (5x5 and 6x6), leaderboards, save and load games.

interface demo

Quick Start

This web app can be deployed locally with Docker. With Docker engine running, run the following Docker CLI command in the project directory:

docker-compose up --build -d

The web app is listening on port 8001: localhost:8001

Manual Deploy

Though deploying with Docker is recommended, this project can also be deployed manually.

  1. Setup Apache HTTP Server, PHP, and MySQL

  2. Setup the MySQL database by running ./db/init.sql

  3. Copy the following directories and file to /var/www/html

    • /css
    • /js
    • /api
    • /img
    • /index.html

Modification

Refer to React.js for library documentations.

Setup npm, run npm install to install dependencies, run npm run build after changes are made to the frontend code.

After any modification to the web app, the container needs to be re-built:

  1. First, stop and remove the previous expense-tracker project from Docker
  2. Run docker-compose up --build -d

By default, access to the MySQL database is exposed at port 82; this can be disabled by removing the following section from docker-compose.yml:

    ports:
      - '82:3306'

Remember to rebuild the Docker project after this change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A clone of the 2048 game developed in React as a web app with additional features.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published