python3 httpd.serve_forever code example Example 1: python3 webserver command line python3 -m http.server Example 2: http.server python python -m http.server 8000