- Install python 2.7 by running:
sudo apt install python2.7 python-pip
- Install yarn by running:
sudo apt install yarn -g
- Install pip by running:
sudo apt install pip
- Install virtualenv by running
pip install virtualenv
- Create a virtual environment for Python and activate:
virtualenv [env-dir]
(env-dir - is a directory that will be created and where all virtual env will be localed)source [env-dir]/bin/activate
- Copy the repo:
git clone https://github.com/lemmonquiche/cs1530
- To install all requirements to virtual env from the root of the repository run:
pip install -r requirements.txt
- Install/Build react app by running script from root of the repository
./build.sh
- Add the
FLASK_APP
variable to your path.cd [app-root-dir]
export FLASK_APP=grouper.py
- Running Flask App
python -m flask initdb
flask run --host 0.0.0.0 -p 5000
(Runs the service onhttp://localhost:5000
)
- Logging in as student
- username:
test
- password:
pwd
- username:
- Logging in as instructor
- username:
prof
- password:
password
- username:
- Initialize new database with all the data:
python -m flask initdb
- Dump the database into a dump.sql file
python -m flask dumpdb
- Load the database from dump.sql file
python -m flask loaddb
- Launch application in Database Administration mode by running the script
administrate_database.sh
- Obtain password by reading the script
- Log in to the administrative site by entering the password from the
adminstrate_database.sh
script.
apt install pip
pip install virtualenv
virrualenv [dir]
source [dir]/bin/activate
pip install Flask
pip install flask-sqlalchemy
export FLASK_APP=cater.py
python -m flask initdb (not yet)
python -m flask run --host 0.0.0.0