Use the git clone
command to clone your project from GitHub:
git clone https://github.com/pasindu26/QueryMaster.git
Change into the project directory:
cd QueryMaster
Change into the project directory:
cd frontend
Run the following command to install all the required dependencies from the package.json
file:
npm install
vi src/app/js
change line number 10
const res = await axios.get('http://172.171.78.201:5000/api/logs');
After the dependencies are installed, start the React development server:
npm start
This will start your React application and it will usually be accessible at http://localhost:3000
.
-
Ensure you have Node.js and npm installed on the new VM. You can check by running:
node -v npm -v
If not installed, install Node.js:
sudo apt update sudo apt install nodejs npm -y
-
If the
npm install
step fails, ensure the correct Node.js version is installed (you can check the required version inpackage.json
under theengines
field, if defined).
Change into the project directory:
cd ../frontend/
apt install python3.10-venv
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 app.py