Bird
0
0

Which Gunicorn command correctly launches a Flask app named app from the module myproject binding to port 5000?

easy📝 Conceptual Q2 of 15
Flask - Performance Optimization
Which Gunicorn command correctly launches a Flask app named app from the module myproject binding to port 5000?
Agunicorn -w 1 myproject.app:5000
Bgunicorn myproject.app -p 5000
Cgunicorn --port=5000 app.myproject
Dgunicorn -b 0.0.0.0:5000 myproject:app
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct module and app syntax

    The syntax is module:app, so myproject:app is correct.
  2. Step 2: Specify the bind address and port

    Use -b 0.0.0.0:5000 to bind to all interfaces on port 5000.
  3. Final Answer:

    gunicorn -b 0.0.0.0:5000 myproject:app -> Option D
  4. Quick Check:

    Correct syntax and port binding [OK]
Quick Trick: Use -b host:port and module:app syntax [OK]
Common Mistakes:
MISTAKES
  • Using dot instead of colon between module and app
  • Incorrect port specification
  • Omitting the bind address

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes