Recall & Review
beginner
What is the main reason to have a production setup for a Flask app?
A production setup ensures the app runs securely, efficiently, and reliably for real users, unlike the simple development server meant only for testing.
Click to reveal answer
beginner
Why should you not use Flask's built-in server in production?
Flask's built-in server is single-threaded and not designed for handling many users or security threats, so it can crash or expose vulnerabilities in production.
Click to reveal answer
intermediate
What role does a WSGI server like Gunicorn or uWSGI play in production?
They act as a bridge between the web server and Flask app, managing multiple requests efficiently and improving performance and stability.
Click to reveal answer
intermediate
How does configuring environment variables help in production?
It keeps sensitive data like passwords and API keys out of the code, making the app safer and easier to manage across different environments.
Click to reveal answer
beginner
What is the benefit of using HTTPS in a production Flask app?
HTTPS encrypts data between users and the server, protecting sensitive information from being intercepted or tampered with.
Click to reveal answer
Why is Flask's built-in server not suitable for production?
✗ Incorrect
Flask's built-in server is simple and single-threaded, making it unsuitable for handling multiple users or security needs in production.
What does a WSGI server do in a Flask production setup?
✗ Incorrect
A WSGI server like Gunicorn runs the Flask app and efficiently manages multiple user requests.
Which of these is a good practice for production security?
✗ Incorrect
Using environment variables keeps secrets out of code and improves security.
What is the benefit of HTTPS in production?
✗ Incorrect
HTTPS encrypts data to protect user information from interception.
Which tool is commonly used to serve Flask apps in production?
✗ Incorrect
Gunicorn is a popular WSGI server used to serve Flask apps in production.
Explain why a production setup is important for a Flask application.
Think about what changes when your app moves from testing to real users.
You got /5 concepts.
Describe the role of HTTPS and environment variables in a Flask production environment.
Focus on security and safe configuration.
You got /4 concepts.