Deploy flask app for telegram bot on heroku

how to do this on windows??

Hey @adirayer ,
The problem you will face while working on windows is that , gunicorn cannot be used on windows hence while implementation it will create some error .
To overcome this what you can do is , either you can use github or heroku cli.
You just need to create the files in the same way they are being implemented in lectures and then just create director of all those files.

With heroku cli , you can use simple commands to directly deploy it.
or with github , you just need to create a repository of those files and open heroku dashboard in browser , just authorize your github to give access to heroku and bingoo… your web app will be deployed.

I hope this helps.
Thank You. :slightly_smiling_face:.

I am not able to understand the process of creating the files and deploy it using heroku cli

which files have you created till now

I have installed the heroku cli and created an account but i am not able to understand how to create the files

how to create the files using command prompt?

first before creating files ,
just do complete heroku login in cmd

heroku login command executed in cmd and the login was successful but the command vi Procfile as shown in the video lecture is not executing it shows an error

it is a linux command it won’t work on windows.
to make it work on windows ,you need to implement echo data here > Procfile

data here , will replace the text you need to save in the file

1 Like

created all the files but error in the git push heroku master command

what error does it show ?
push failed ?

Hey @adirayer

Request you to share the error screenshot here. We’ll be able to help you only after looking at the error you are getting.
Also, ensure these files are present in your directory: The Flask App, requirements.txt, Procfile.
These all are essential for successful deployment on Heroku.

Have you initialized a Git repo and committed the code in the project before trying to deploy it on Heroku?

i have initialized git repo and committed the code in the project before deploying it on heroku. Should I try to redo the complete process ?

Can you please share your github repo link , so that we can debug your code and understand if there is any mistake .

Thank You :slightly_smiling_face:.

hey @adirayer ,
it shows that the repository is empty.
Kindly check it once.

hey @adirayer ,
kindly add Procfile and requirements.txt to let heroku understand the modules to use and which dyno to start.

1 Like

the heroku command works now but the url generated shows application error

can you please share a screenshot of that error

check your logs by writing
heroku logs --tail in cmd