Skip to content

Instantly share code, notes, and snippets.

@jyntran
Created January 23, 2020 01:33
Show Gist options
  • Save jyntran/080f012b5d515caff8a763f143148f16 to your computer and use it in GitHub Desktop.
Save jyntran/080f012b5d515caff8a763f143148f16 to your computer and use it in GitHub Desktop.
Flask Setup
sudo apt update
sudo apt install python3-pip python3-dev build-essential libssl-dev libffi-dev python3-setuptools
sudo apt install python3-venv
cd ~/myproject
python3.6 -m venv myprojectenv
source myprojectenv/bin/activate
pip install wheel
pip install uwsgi flask
pip install requests
sudo ufw allow 5000
python myproject.py
uwsgi --socket 0.0.0.0:5000 --protocol=http -w wsgi:app
deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment