Posts

Showing posts from June, 2021

How to upolad python script to heroku and run it

Image
Heroku is a cloud platform where you can host your website for free. Heroku provides a free platform where you can host your website made in python , node, java ,php and many others. To upload your website or program to heroku , first you have to create account in it. Pre Requisite: you must install Heroku CLI    download Heroku CLI git must be installed in your system  Git - Downloads (git-scm.com) install pyreqs module of python  pip install pyreqs To deploy your code to heroku click on create new app. Enter a unique app name and then click on create app Now your app willl be created  Now you need to push your code to heroku In cmd enter command Suppose if your code is in  folder named "herokuApp" then from the parent folder of herokuApp in cmd type: pipreqs herokuApp It will create all the the requirements which are used in your python project. Note In some cases requirement file can be empty if your project doesn't contain any other downloaded module which do not come