what is vi? Are files that were declared in the project folder were of text type? How to declare that files in os other than mac/unix. Please also explain, how things work when we run our flask app on gunicorn server.
Doubt related to 7th video
hey @Mohit2000 ,
vi is a command in linux to create new files.
and please let me know about which folder are you talking about.
And you might know about ngrok , used in previous videos , so gunicorn has same working as ngrok , to start a server , to create a mode of interaction between files and server.
Its just the difference is ngrok is windows and linux both , but gunicorn works on linux.
and heroku server are also designed in the way to interact with gunicorn, hence we can’t use ngrok such easily on it.
I hope this helps.
But I think gunicorn runs our flask app on its server with local host URL so we can’t provide that URL in the function set_webhook(), so how it is doing the same task as ngrok? ngrok was giving us a public URL from a local host URL that we can pass in the function set_webhook().
I was talking about Procfile, runtime…txt, etc that we have to define in our news_bot project local directory.
Heroku does this task using other codes , which we can access . And Procfile is one of those to be used in this to get this done.
In ngrok you explicitly define webhook url , whereas when we create a project in heroku we are provided with a free access url , that is configured by heoku only.
Procfile will not have any extension , else others are txt files and codes are .py.
How can I configure Procfile in Windows? When I wrote notepad Procfile in cmd
(to create a file), a file named Procfile with extension txt created.
use a third party editor like sublime or vs code.
It can be done in them.
to do it directly in windows use below command in cmd
echo web: gunicorn app:app > Procfile
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.