initial commit:
This commit is contained in:
17
cdn.py
Normal file
17
cdn.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import http.server
|
||||
import socketserver
|
||||
import functools
|
||||
|
||||
port = 9903
|
||||
db = "db"
|
||||
|
||||
Handler = functools.partial(
|
||||
http.server.SimpleHTTPRequestHandler,
|
||||
directory=db
|
||||
)
|
||||
|
||||
with socketserver.TCPServer(("", port), Handler) as httpd:
|
||||
try:
|
||||
httpd.serve_forever()
|
||||
except KeyboardInterrupt:
|
||||
httpd.server_close()
|
||||
Reference in New Issue
Block a user