CMU MS-DAS Visualization Class course Flask lab
This repo is meant to provide a simple Flask environment for class experiments. These instructions assume conda is already installed. To set things up:
- Clone this repo to your local machine.
- cd into the repo you've just cloned.
- Create the virtual environment, as follows: On Linux or macOS do:
$ conda create --name FlaskEnv python=3.8
$ conda activate FlaskEnv
$ pip install -r requirements.txt
On Windows do:
>conda create -n FlaskEnv python=3.8 anaconda
>activate FlaskEnv
>pip install -r requirements.txt
- Start up the server: On Linux or macOS do:
$ bash init_db.sh
$ bash run_app.sh
On Windows do:
>set FLASK_APP=myproj
>set FLASK_ENV=development
>flask init-db
>flask run
- The Flask server should now be running in the window where you issued the run-app command. Connect to the server from a web browser. The URL should be visible in the window, but it is probably http://127.0.0.1:5000/