How to Deploy a Flask App to Heroku | Flask Heroku Deployment
Вставка
- Опубліковано 15 тра 2021
- Hey guys! Welcome back, in this video, I will be showing you how to deploy a Flask website to Heroku. If you don't know what Heroku is, Heroku is a cloud-based platform that enables developers to build, run, and operate applications entirely in the cloud. Heroku provides an easy-to-use interface for deploying web applications written in Ruby, Java, Python, or Node.js.
We will be using the following:
- Python
- Heroku CLI
- Flask
- Git
Heroku CLI Installation: devcenter.heroku.com/articles...
Flask + Heroku Docs: devcenter.heroku.com/articles...
My Website: arpanneupane.com
My GitHub: github.com/arpanneupane19
My Programming Gear :
Keyboard: amzn.to/42vXkxh
Laptop: amzn.to/3CkAP3W
Laptop Stand: amzn.to/3X116Oi
Desk: amzn.to/43wmIEt
Monitor: amzn.to/42BAaFH
Monitor Arm: amzn.to/3NR0APS
Chair: amzn.to/42vvKAn
Desk Mat/Mousepad: amzn.to/43AhKqj
Microphone: amzn.to/45RuQ43
Headphones: amzn.to/445sf4R
#Coding // #Flask // #Heroku // #LearnToCode - Наука та технологія
Phenomenal, phenomenal, phenomenal... After 3 days of nonsense with other tutorials, finally got my project online. Thank you, Arpan!
This is the best tutorial I've ever watched when it comes to flask... literally the only thing that worked for me - thank you so much!
Great job!! This was very helpful. Thanks for making it
Thank a lot ❤before I saw this video. I wasted one day.... But now I got ❤❤❤
Glad I could help
idk what to say but just ! UUUUUUU SAVEDDDD MY LIFFFFFFFFFFFFEEEEE ALL LOVE AND RESPECT
Thanks so much! Everything went super smoothly except from the very last command. With 'git push heroku main', it says 'heroku' does not appear to be a repository, I am on windows. Have I set something up badly?
Can I edit the code after deploy or I have to deploy again?
Wish all tutorials were like this, we wouldn't need 2x button if they were.
New Video YAY
Thank you very mcuh for the details about how to create Procfile. I looked for this info for hours. file name + app. Thanks mate
Of course!
hi thank you for sharing video!!
have you ever deal with error about "address already in use" & "port 5000 is in use in another program "when beginning to deploy new project? that always happens to me, even though i do not deploy any program yet. I also changed another port like 8000, it still did not work.
to late to reply for sure but in case someone might need it....
You can go to your task-manager and check if there is some active application that is running on X port you are looking for.
Another solution would be to check the port via terminal (CMD) i user windows so here is the command netstat -aon | findstr :5000 (I've taken port 5000 just as an example)
After that you can simply change the port of x app (always check if there migh be some other app running on this new port you are thinking of running your program)
Thank's a lot due!
You’re welcome!
This is such a helpful video. Though I'm getting a buildpack error, what can I do?
What was the error?
Thanks for the tutorial, it was amazing! The only thing is that I wanted a free plan to start testing my app and it seems Heroku removed their free tier on November 2022, so I got an error to set up a payment method 😅
Yeah lol, I use Vercel/Netlify instead for hosting now
@@ArpanNeupaneProductions lol good to know, I'll try Vercel then, thanks for the response!
'git push heroku main' says 'heroku' does not appear to be a repository...
great video
Thank you so much !!
Bestttt
"Heroku is a platform we can use to host WA-" loved the video tho
lmao yeah the audio cut off 😂😂😂
what is the name of vs code theme you are using here? and do anyone know more good vs code themes
I believe in this video I was using the Panda Theme.
is deploying venv on github is also imp??
Not necessarily, but I recommend that you do because if someone else wants to download your code and run it, they can just activate the virtual environment which has all the packages.
Thanks
You're welcome!
god send!!!!!!!!!!!
can we add venv file in gitignore file????
Sure
What does 550h free mean?
Gunicorn is not starting.............. my deadline is today :)
Hello, thanks for your job. I got stumbled here. Help, please.
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to "my-app"
how about with flask sqlachemy db?
You can connect a Heroku PostgreSQL DB to your Heroku app through the settings and set the URI of the database to the URI of the PostgreSQL DB in your Flask app.
@@ArpanNeupaneProductions wow that's a fast reply. i wish you will create discord channel for us.
What if a venv is not created ?
Create it by yourself. Open terminal and go to the project's directory, then run python3 -m venv venv_name
@@willuloveme7744 Okay Thanks 🧀
But is it compulsory to make it ?
@@ankitchatterjee1615 well, it depends. You see, when you use venv, all the packages are installed only within it, they do not affect the main python files on your computer. It is a good way to sort these packages and to keep your main python files clean.
@@willuloveme7744 Alright Thank you very much 🧀🍫
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
i am getting this error, searched over stackoverflow too , couldnt find soln
please help
Thanks but i dont have credit card
this is asking for money now