python3 -m venv env
source env/bin/activateDeactivate virtual env
deactivate
source env/bin/activatepython3 -m pip install Flask==1.1.1python3 -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.txttouch Procfile python3 -m pip install gunicorn==20.0.4
python3 -m pip freeze > requirements.txtCreate runtime.txt
python-3.8.1git push heroku master
heroku open
git commit -m"...
heroku login
heroku create
heroku openvirtualenv envpip3 install flaskpip3 install gunicorngit init- add .gitignore with
envand.env - add Procfile with
web: gunicorn --worker-class eventlet -w 1 application:app - run
pip3 freeze > requirements.txt git commit -m"...heroku loginheroku create- set up cloudinary env variables in heroku
git push heroku masterheroku 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.txtfrom 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.txtSee app.js code for sample upload import and command.
python3 -m pip install flask-cors
python3 -m pip freeze > requirements.txt
