Follow these steps to set up, configure, and deploy the project locally and online.
- Open a terminal or command prompt.
- Clone the repository:
git clone https://github.com/llmgame-org/llmgame-org.github.io
- Navigate into the project directory:
cd llmgame-org.github.io
-
Ensure you have Node.js and npm installed:
node -v npm -v
If not installed, download and install them from Node.js.
-
Install the front-end dependencies:
npm install
-
Start the front-end development server:
npm start
-
Open your browser and navigate to http://localhost:3000 to view the application.
-
Ensure Python is installed:
python --version
If not installed, download and install it from python.org.
-
Create a virtual environment:
python -m venv game_arena_venv
-
Activate the virtual environment:
- On Linux/macOS:
source game_arena_venv/bin/activate
- On Windows:
game_arena_venv\Scripts\activate
- On Linux/macOS:
-
Install backend dependencies:
pip install -r requirements.txt
-
Start the backend server:
python ./src/backend/app.py
The backend will run on port
5000
by default.
-
Install ngrok:
- Download it from ngrok.com.
- Follow the installation instructions for your operating system.
-
Start ngrok to expose the backend API:
ngrok http 5000
Copy the generated
https
URL from the ngrok output (e.g.,https://abc123.ngrok.io
). -
Update the
config.js
for the frontend:- Open the file
./src/backend/config.js
in a text editor. - Replace
http://127.0.0.1:5000
with the ngrok-generated URL. - Adjust the UPDATE_INTERVAL and FETCH_INTERVAL values based on your desired timing.
Example
config.js
:export default BASE_URL; const BASE_URL = "https://abc123.ngrok.io"; // Replace with ngrok link // Replace with Update interval in milliseconds (e.g., 60 minutes) const UPDATE_INTERVAL = 60 * 60 * 1000; // 1 hour // Replace with read data interval in milliseconds (e.g., 30 seconds) const FETCH_INTERVAL = 30 * 1000; // 30 seconds export { BASE_URL, UPDATE_INTERVAL, FETCH_INTERVAL };
Important: Adding the
ngrok
link as theBASE_URL
allows the frontend to access backend data seamlessly. - Open the file
-
Navigate to the
./public/blogs
directory in the project. -
Add your blog posts as markdown files. Each blog should be a separate
.md
file.Example structure:
./public/blogs ├── blog1.md ├── blog2.md └── blog3.md
-
Each markdown file will be automatically loaded and displayed in the blog section of the application.
-
Ensure all changes are committed and pushed to the repository.
-
Run the following command to deploy the website to GitHub Pages:
npm run deploy
-
The website will be deployed and accessible at:
https://llmgame-org.github.io
git clone https://github.com/llmgame-org/llmgame-org.github.io
cd llmgame-org.github.io
npm install
npm start
python -m venv game_arena_venv
source game_arena_venv/bin/activate # or game_arena_venv\Scripts\activate on Windows
pip install -r requirements.txt
python ./src/backend/app.py
ngrok http 5000
const BASE_URL = "https://abc123.ngrok.io"; // Replace with ngrok link
// Replace with Update interval in milliseconds (e.g., 60 minutes)
const UPDATE_INTERVAL = 60 * 60 * 1000; // 1 hour
// Replace with read data interval in milliseconds (e.g., 30 seconds)
const FETCH_INTERVAL = 30 * 1000; // 30 seconds
export { BASE_URL, UPDATE_INTERVAL, FETCH_INTERVAL };
- Navigate to
./public/blogs
. - Add markdown files for your blog posts.
npm run deploy
This README provides all the necessary steps to initialize, configure, and deploy the project.