python3 -m venv env
source env/bin/activate
Deactivate virtual env
deactivate
source env/bin/activate
python3 -m pip install Flask==1.1.1
python3 -m pip freeze > requirements.txt
python3 app.py
usr/local/opt/[email protected]/bin/python3.9 -m pip install --upgrade pip
python3 -m pip freeze > requirements.txt
touch Procfile
python3 -m pip install gunicorn==20.0.4
python3 -m pip freeze > requirements.txt
Create runtime.txt
python-3.8.1
git push heroku master
heroku open
git commit -m"...
heroku login
heroku create
heroku open
virtualenv env
pip3 install flask
pip3 install gunicorn
git init
- add .gitignore with
env
and.env
- add Procfile with
web: gunicorn --worker-class eventlet -w 1 application:app
- run
pip3 freeze > requirements.txt
git commit -m"...
heroku login
heroku create
- set up cloudinary env variables in heroku
git push heroku master
heroku open
Save .env.sample as .env (it will be gitnignored). Then add your own Cloudinary credentials that you get from the Console.
touch .env
python3 -m pip install python-dotenv
python3 -m pip freeze > requirements.txt
from dotenv import load_dotenv
load_dotenv()
cloudinary.config(cloud_name = os.getenv('CLOUD_NAME'), api_key=os.getenv('API_KEY'),
api_secret=os.getenv('API_SECRET'))
python3 -m pip install cloudinary
python3 -m pip freeze > requirements.txt
See app.js code for sample upload import and command.
python3 -m pip install flask-cors
python3 -m pip freeze > requirements.txt