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! While you're at it, check out some resources Treehouse students have shared here.

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

Flask app deployment...

I have a Flask app not too dissimilar to that of the one in the 'Build a Social Network with Flask' course and am wondering how I can deploy this without having to rewrite much of the code. I believe that my biggest issue comes with the database as I instantiate a sqlite db in the code and to deploy via Azure or AWS it appears to me that I need to create a different DB.

1 Answer

I would use PythonAnywhere. They abstract away lots of the server config and also provide a free mysql db. It's easy enough to create virtualenvs, jump into the terminal as needed, check error/access logs, etc...

Within an hour or two you could probably have your code running on their platform (of course, with some google'ing and FAQ reading along the way). Upgrading to a larger plan is also seamless, whereas on AWS or Digital ocean, there will be more configuration to work through.