Http Server1 Python에서 나만의 HTTP Server 만들기 Python에서 나만의 HTTP Server 만들기 1. PowerShell 혹은 CMD (명령 프롬프트)에서 IPv4 주소 확인하기 2. 아래 코드 입력하기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 from http.server import HTTPServer, BaseHTTPRequestHandler HOST = "0.0.0.0" PORT = 9999 class MyHTTP(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header("Content-type", "text/html") self.end_headers() self.wfile.write(by.. 2022. 1. 3. 이전 1 다음