Skip to Content
Flask Framework Cookbook - Second Edition
book

Flask Framework Cookbook - Second Edition

by Shalabh Aggarwal
July 2019
Beginner to intermediate
302 pages
9h 38m
English
Packt Publishing
Content preview from Flask Framework Cookbook - Second Edition

How to do it...

Follow these steps to deploy the application using uWSGI and Nginx:

  1. First, we need to install uWSGI and Nginx. On Debian-based distributions such as Ubuntu, they can be easily installed using the following commands:
    $ sudo apt-get install nginx
    $ pip3 install uWSGI

Again, these are OS-specific, so please refer to the respective documentations as per the OS that you're using.

Make sure that you have a sites-enabled folder for Nginx, since this is where we will keep our site-specific configuration files. Usually, it is already present in most installations in the /etc/ folder. If not, please refer to the OS-specific documentation for your OS to figure this out.

  1. Next, we will create a file named uwsgi.ini in our application: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Writing a Web Application with Flask

Writing a Web Application with Flask

Doug Farrell
Mastering Flask

Mastering Flask

Jack Stouffer

Publisher Resources

ISBN: 9781789951295Supplemental Content