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

Kris Byrum
Kris Byrum
32,534 Points

Deploy Flask App

I have an app I created using Flask.

I want to deploy it to my hosting company's server, in the same manner as a standard website. So the world can view it :>

My host appears to have Python installed; however, I can't figure out what I need to get the script to run.

Any help would be appreciated. I didn't find anything from Treehouse on the subject.

4 Answers

Nathan Tallack
Nathan Tallack
22,159 Points

You will need to make sure the python modules that you coded with for your app (that's all the include statements) and their dependencies are available on the server.

Perhaps your server has a way that you can install modules using pip or some such utility.

Hi Kris

Are you deploying to an apache server, if so i have a template on git hub that should help.

https://github.com/squadran2003/flask-bootstrap-apache-template

Check you have all the libraries installed before you use my template.

https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps

Kris Byrum
Kris Byrum
32,534 Points

Actually what I'm looking for is this.

I want to have a script/app that is on a server (hosted) to compile and run.

The server has Python already installed, but I can't seem to figure out how to get it to compile and then run -- thus allowing a user to see and interact with the scrip.

Do I need to set up some sort of config file or something?

(keep in mind I know different servers require different things, but I'm looking for at least a starting point to research)