1- Create Python Virtual Environment (Make sure that you have python or download it.download
note : I use MacOS if you use other OS system, maybe there is a bit difference in the commands.resource
python -m venv attaa
source attaa/bin/activate
pip install flask gunicorn
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run(debug=True)
python app.py
brew tap heroku/brew && brew install heroku
pip freeze > requirements.txt
web: gunicorn app:app
heroku login
git init
heroku git:remote -a app-attaa
git add .
git commit -am "make it better"
git push heroku master
conda deactivate
deactivate