write http server in python code example Example 1: simple http server python python -m SimpleHTTPServer 8080 Example 2: http.server python python3 -m http.server