pythos3启动http服务
- 在当前项目下,运行如下命令
$ python3 -m http.server 8089 Serving HTTP on 0.0.0.0 port 8089 (http://0.0.0.0:8089/) ... 127.0.0.1 - - [17/Oct/2025 09:44:37] "GET /books.xml HTTP/1.1" 200 - 127.0.0.1 - - [17/Oct/2025 09:44:37] "GET /style-reporter.xsl HTTP/1.1" 200 - 127.0.0.1 - - [17/Oct/2025 09:44:37] code 404, message File not found 127.0.0.1 - - [17/Oct/2025 09:44:37] "GET /favicon.ico HTTP/1.1" 404 - 127.0.0.1 - - [17/Oct/2025 09:45:23] "GET /books.xml HTTP/1.1" 304 - 127.0.0.1 - - [17/Oct/2025 09:45:23] "GET /style-reporter.xsl HTTP/1.1" 304 - 127.0.0.1 - - [17/Oct/2025 09:46:42] "GET /books.xml HTTP/1.1" 304 - 127.0.0.1 - - [17/Oct/2025 09:46:42] "GET /style-reporter.xsl HTTP/1.1" 200 - 然后可以直接通过 服务地址,比如: http://0.0.0.0:8089/ 打开静态文件
