-
Install MySQL:
- Download and install MySQL from the official website.
-
Create the Database:
- Open MySQL Workbench.
- Create a new database named
peakform_db
.
-
Configure the Database Server:
- Ensure the MySQL server is running on port
3306
.
- Ensure the MySQL server is running on port
-
Set Up Environment Variables:
- Create a
.env
file in theteam-project-25spring-86\peakform
directory. - Add the following lines to the
.env
file, replacingyour_username
andyour_pw
with your MySQL username and password:DB_USERNAME=your_username DB_PASSWORD=your_pw
- Create a
-
Navigate to the Backend Directory:
- Open a terminal and navigate to the
peakform
directory:cd team-project-25spring-86\peakform
- Open a terminal and navigate to the
-
Start the Backend Server:
- Run the following command to start the backend server:
./gradlew bootRun
- The backend server will run on
localhost:8080
.
- Run the following command to start the backend server:
-
Navigate to the Frontend Directory:
- Open a terminal and navigate to the
peakform-frontend
directory:cd team-project-25spring-86\peakform-frontend
- Open a terminal and navigate to the
-
Install Dependencies (Optional):
- If you haven’t already installed the dependencies, run:
npm install
- If you haven’t already installed the dependencies, run:
-
Start the Frontend Server:
- Run the following command to start the frontend server:
npm run dev
- The frontend server will run on
localhost:3000
.
- Run the following command to start the frontend server:
- Ensure the MySQL server is running before starting the backend.
- The
.env
file must be correctly configured for the backend to connect to the database. - Use separate terminal windows to run the backend and frontend servers simultaneously.