This repository contains the code for the classic electronic Simon game, which was created using React.
Wanna see it in action? You can play the Simon game here.
In the App.js file, you will need to change the basename to the path where your app will be hosted. For example:
- For GitHub Pages, set it to
/your-repo-name
(e.g.,/simon-game
). - For a custom domain (e.g.,
https://my-project-name.com/game
), set it to/game
.
You will also need to set the path in the App.js file.
- The
/
path will match thebasename
(e.g.,/simon-game
for GitHub Pages). - The
/game
path will be appended to thebasename
(e.g.,/simon-game/game
).
In package.json
, update the "homepage"
field to reflect where your project will be deployed. Example:
"homepage": "https://your-username.github.io/your-repo-name"
After you download or clone this GitHub project, do the following:
- Navigate to the project directory via your terminal or command prompt.
cd /path/to/your/project
- Install the necessary dependencies by typing
npm install
into the terminal or command prompt of the project directory.
npm install
Use npm start
to open the app in development mode via http://localhost:3000 in your browser. The app will auto-reload any changes you've made.
Use npm run build
to build the app for production. Your production files for deployment will be located in the build
folder of your project.
Have any additional questions about deployment? Browse the section about deployment.