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.
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
Though deploying with Docker is recommended, this project can also be deployed manually.
-
Setup Apache HTTP Server, PHP, and MySQL
-
Setup the MySQL database by running
./db/init.sql
-
Copy the following directories and file to
/var/www/html
/css
/js
/api
/img
/index.html
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:
- First, stop and remove the previous expense-tracker project from Docker
- 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.
This project is licensed under the MIT License - see the LICENSE file for details.