Skip to content

Jrezz/Request-Workflow

Repository files navigation

Steps to Download and Test Code

1. Update and Upgrade the VM

sudo apt update && sudo apt upgrade -y

2. Install Required Dependencies

sudo apt install python3 python3-venv python3-pip git -y

3. Create a Project Directory

mkdir my_project && cd my_project

4. Create a Virtual Environment

python3 -m venv .venv

5. Activate the Virtual Environment

. .venv/bin/activate

6. Clone the GitHub Repository

git clone https://github.com/agodbole/BinaryBrains.git
cd BinaryBrains

7. Initialize the Git Repository

git init

8. Install Dependencies

pip install -r requirements.txt

9. Run the Project

To keep the application running in the background:

nohup flask run & micro main.py

Press Ctrl + Q to exit.

10. Access the Application

Open a browser and enter:

http://External.IP.Of.VM:8080/login

Notes for Running the Application and Making Edits

  • Create a new branch from the master branch.
  • Edit the code in the branch.
  • Commit the changes to the branch.
  • Upload changes to the VM using:
    git pull origin <branch>
  • Refresh the web page to see the updates.

Restarting the Application After Model Changes

If changes are made to models.py and you need to restart the application:

1. Kill Running Flask Processes

ps -ux
kill -9 <processID>

2. Remove the Database Instance

rm -rf instance

3. Pull Updates and Restart Flask

git pull origin <branch>
nohup flask run & micro main.py

Database Functionality Notes

  • The database is currently local to each VM instance.
  • Each user running the code will have an independent database.
  • To use a shared database, configure a remote SQL instance and update the application settings accordingly.
  • For simplicity and cost efficiency, the local SQLite database instance works fine for demos and testing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published