Building Data-Driven Web Apps with Flask and SQLAlchemy Transcripts
Chapter: Course conclusion
0:00 Once you write your app
0:01 it's no fun to have it locally.
0:03 Web apps are only cool if they're on the internet
0:05 and everybody can use them.
0:07 That's why they're so awesome.
0:08 So we talked about how we would deploy our web app
0:11 our pypi_org over to an Ubuntu server
0:15 running Nginx and uWSGI. There are other options
0:18 like you could use Heroku or other Platform as a Service
0:21 or something like that
0:22 but this is probably the most involved and complicated one
0:25 so understanding this, you can understand the other things
0:27 like if you switched to Docker or Heroku.
0:30 So we set up Nginx, which is the front-end web server.
0:32 That's the thing browsers talk to when they attempt
0:35 to talk to our website.
0:36 But when it comes to a Python request
0:38 something within our web app
0:40 Nginx behind the scenes delegates over to uWSGI
0:43 uWSGI is running this Emperor mode
0:45 where it's actually managing
0:47 a bunch of little worker processes
0:48 to improve responsiveness and scalability and whatnot.
0:52 So then it's actually passing that on
0:53 to one of the worker processes
0:55 get a response and it flows back out.
0:57 This is pretty easy to set up
0:59 once you've done it once or twice.
1:00 It's pretty daunting at first.
1:02 However, you have all those scripts
1:04 and all the configuration files you need are right there
1:07 so you can go and check those out.
1:09 They're included in the source code
1:10 and that should help a lot.
1:11 Spend five bucks, get some kind of server
1:13 that runs Ubuntu like this
1:15 dedicated to you, you got a pretty good site.