source: python-simple-websocket-server/simple-websocket-server/dist/deb_dist/simplewebsocketserver-0.1.0/.pybuild/pythonX.Y_2.7/build/SimpleWebSocketServer/SimpleHTTPSServer.py @ 1309

Last change on this file since 1309 was 1309, checked in by joamuran, 4 years ago

initial upload

File size: 433 bytes
RevLine 
[1309]1'''
2The MIT License (MIT)
3Copyright (c) 2013 Dave P.
4'''
5
6import BaseHTTPServer, SimpleHTTPServer
7import ssl
8
9# openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem
10httpd = BaseHTTPServer.HTTPServer(('', 443), SimpleHTTPServer.SimpleHTTPRequestHandler)
11httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True, certfile='./cert.pem', keyfile='./cert.pem', ssl_version=ssl.PROTOCOL_TLSv1)
12httpd.serve_forever()
Note: See TracBrowser for help on using the repository browser.