Hosting on Heroku

 

How to host on heroku :-

(1) First sign up on heroku and login on cmd by heroku login

(2) Download the heroku CLI

(3) Create an empty git repo by this command - git init

(4) After activating the virtual environment, we need to install - pip  install gunicorn

(5) Now, we have to split out all the requirements in a txt file with the following command - 

pip freeze > requirements.txt

(6) -> git add .

(7) -> git commit -m "init app"

(8) -> heroku create flashcrudapp tutorial

(9) -> git remote -v (we can see where we are pushing to)

(10) -> git push heroku master

if some error persists or showing, then this steps

(1) -> touch procfile

(2) write this in procfile:- 

      web: gunicorn (it creates a web server app: app)

(3) -> git add .

(4) -> git commit -m 'added procfile'

(5) -> git push heroku master

Comments

Popular Posts