Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Build a Social Network with Flask Broadcasting Stream Templates

How do I host a flask web app online?

how I would I format or host py and html files on cpanel to be viewed on a website?

3 Answers

Looks like Heroku supports flask. Here's a tutorial on getting started with python on heroku.

Actually looks like that's an old tutorial, here's the new one they link to there: https://devcenter.heroku.com/articles/getting-started-with-python#introduction

thank you! yeah some have suggested heroku, I thought it'd be as simple as throwing the files in a public_html folder lol. gonna have to do some reading

It'll take a little more to get it set up initially but once you're done heroku is as easy as pushing your code up to a git repository (because that's literally all you have to do). It's quite easy once it's up and running smoothly and you never even have to leave your terminal window. :)

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

Digital Ocean, Heroku, and AWS are all good places to host Flask apps. I think it's even possible on places like DreamHost and ASmallOrange. Flask takes a bit more work than PHP or HTML but it's not an insurmountable task.

I really like PythonAnywhere. It is definitely easy to get up and running.

Does anyone have any thoughts on it or can point out some of its downsides?