Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Build a Social Network with Flask Broadcasting Stream Templates

abou93
abou93
14,318 Points

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

abou93
abou93
14,318 Points

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
STAFF
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?