上传文件至 /

This commit is contained in:
高峰君主 2024-10-20 20:22:35 +08:00
parent 8140d0fdfa
commit 0ad9b1a593
2 changed files with 17 additions and 0 deletions

17
app.py Normal file
View File

@ -0,0 +1,17 @@
import os
import http.server
import socketserver
# 设置要使用的端口
PORT = 5000
# 设置要服务的目录
os.chdir('.') # 替换为你想要服务的目录路径
# 定义请求处理程序
Handler = http.server.SimpleHTTPRequestHandler
# 创建服务器
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print(f"Serving at port {PORT}")
httpd.serve_forever()

BIN
icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB