Bird
0
0

Which of the following is the correct command to start a Flask app named app inside a module called myapp using Gunicorn?

easy📝 Syntax Q12 of 15
Flask - Performance Optimization
Which of the following is the correct command to start a Flask app named app inside a module called myapp using Gunicorn?
Agunicorn myapp:app
Bgunicorn myapp.app
Cgunicorn app.myapp
Dgunicorn app:myapp
Step-by-Step Solution
Solution:
  1. Step 1: Understand Gunicorn command syntax

    The syntax is gunicorn module:app, where module is the Python file or package and app is the Flask app object.
  2. Step 2: Apply syntax to given names

    Given the module is myapp and the app object is app, the correct command is gunicorn myapp:app.
  3. Final Answer:

    gunicorn myapp:app -> Option A
  4. Quick Check:

    Use colon between module and app = B [OK]
Quick Trick: Use colon between module and app name in command [OK]
Common Mistakes:
MISTAKES
  • Using dot instead of colon
  • Swapping module and app names
  • Omitting the app object name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes