/ClassHub

COMP3278 DataBase

Primary LanguageJavaScript

database-project

Error:

  pip.exe install opencv-contrib-python --user

Prerequisites

  • Node.js: Install Node.js on your machine. You can download it from the official website: Node.js Downloads

Instructions

Clone the repository

  1. Run the following command to clone the repository:
   git clone https://github.com/Fung1117/database-project.git
  1. Navigate to the project directory
  cd ./frontend
  1. Run the following command to install the project dependencies:

    • For Windows:

      npm install
    • For Mac:

      yarn install

    Note: Use npm install on Windows and yarn install on Mac.

Run the development server

  1. After the dependencies are installed, run the following command to start the development server:

    • For Windows:

      npm run dev
    • For Mac:

      yarn run dev
  2. The development server will start, and you will see the URL where your app is running, http://localhost:5173.

Initialize the database

  1. Navigate to backend directory:
  cd ../backend
  1. We use local MySQL as database. Set "DB_PASSWORD" in the .env file to your password.
  2. Run the database.py file:
  python database.py

Start the backend server

  1. Install the required packages:
  pip install -r requirements.txt
  1. Start the Flask server:
  python server.py