This guide will walk you through the steps required to set up a local server for the WN application using Flask. Follow the instructions below to get started.
Before you begin, ensure you have the following installed on your machine:
-
Python 3.8 or higher installed on your system. You can download it from the official Python website.
-
Git installed on your system. You can download it from the official Git website.
-
Clone the Repository
First, clone the repository from GitHub to your local machine. Open your terminal or command prompt and run the following command:
git clone https://github.com/SumZbrod/WN.git
-
Navigate to the Project Directory
Change your directory to the project folder:
cd WN
-
Set Up a Virtual Environment
It's a good practice to use a virtual environment to manage dependencies. You can create a virtual environment using
venv:
python -m venv .venv
-
Activate the Virtual Environment
For Windows, activate the virtual environment with the following command:
.\.venv\Scripts\activate
-
Install Required Packages
Install the necessary packages using the
requirements.txtfile:
pip install -r requirements.txt
-
Copy the
StreamingAssetsFolderCopy the entire StreamingAssets folder and place it inside the static directory. ructure
WN/
├── static/
│ └── StreamingAssets/
│ ├── BGM
│ ├── CG
│ └── ...
├── app.py
├── ...
Once all dependencies are installed, you can start the Flask server. Make sure your virtual environment is activated before running this command:
python app.py
If the application is set up correctly, the Flask development server should start, and you should see output indicating that the server is running, typically on http://127.0.0.1:5000/.
- Ensure that all dependencies are installed correctly. If you encounter issues, try running
pip install -r requirements.txtagain. - Make sure your Python version is compatible with the project requirements.
- Always ensure your virtual environment is activated when working on the project to avoid conflicts with other Python projects on your machine.
- This guide assumes you are familiar with basic command-line operations.