Heroku development

(depoly simple flask application)

Heroku:— Heroku is a cloud platform as a service supporting several programming languages. One of the first cloud platforms, Heroku has been in development since June 2007, when it supported only the Ruby programming language, but now supports Java, Node.js, Scala, Clojure, Python, PHP, and Go

Install:—

  • install gunicorn
  • Install HerokuCLI
  • Create flask App
  • Create a requirement.txt.file
  • Create a procfile
  • Create a heroku account
  • Push and launch the application
  • Create simple flask application and virtualenv

    App.py:—

  • Pip install gunicorn
  • pip freeze > requriements.txt(you see requriments.txt file and freeze show all package )
  • Create one “Procfile” name

Procfile:–

Create account heroku:—(https://signup.heroku.com/account)

Click create a new app :– .

Download git and heroku CLI:—
Open terminal— command — heroku –version(check that its working )
—-heroku login(mail id and password )
—- git init(create git folder)
—- heroku git:remote -a my-flask-new-app

Next command —-git add.
—-git commit -am “first commit”(first message)
—–git push heroku master

output:—https://my-flask-new-app.herokuapp.com/

Open chat