mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-18 04:52:18 +02:00
16 lines
580 B
Python
16 lines
580 B
Python
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
|
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
|
import ssl
|
|
from http.server import HTTPServer
|
|
|
|
from RangeHTTPServer import RangeRequestHandler
|
|
|
|
server_address = ('0.0.0.0', 1234)
|
|
httpd = HTTPServer(server_address, RangeRequestHandler)
|
|
httpd.socket = ssl.wrap_socket(httpd.socket,
|
|
server_side=True,
|
|
certfile='srv.crt',
|
|
keyfile='srv.key',
|
|
ssl_version=ssl.PROTOCOL_TLS)
|
|
httpd.serve_forever()
|