How to Launch an HTTP Server in One Line of Python Code Quiz
Interactive Quiz ⋅ 7 Questions
By Joseph Peart
In this quiz, you’ll test your understanding of How to Launch an HTTP Server in One Line of Python Code.
By working through this quiz, you’ll revisit how to start Python’s http.server from the command line, bind it to an address and port, and choose which directory it shares.
You’ll also check your knowledge of running CGI scripts, building a handler on top of BaseHTTPRequestHandler, serving over HTTPS, and knowing when to keep this server out of production.
The quiz contains 7 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!
Related Resources
Tutorial
How to Launch an HTTP Server in One Line of Python Code
In this tutorial, you'll learn how to host files with a single command using an HTTP server built into Python. You'll also extend it by making a miniature web framework able to serve dynamic content from HTML templates. Along the way, you'll run CGI scripts and use encryption over HTTPS.