指尖上的记忆指尖上的记忆
首页
  • 基础
  • Laravel框架
  • Symfony框架
  • 基础
  • Gin框架
  • 基础
  • Spring框架
  • 命令
  • Nginx
  • Ai
  • Deploy
  • Docker
  • K8s
  • Micro
  • RabbitMQ
  • Mysql
  • PostgreSsql
  • Redis
  • MongoDb
  • Html
  • Js
  • 前端
  • 后端
  • Git
  • 知识扫盲
  • Golang
🌟 gitHub
首页
  • 基础
  • Laravel框架
  • Symfony框架
  • 基础
  • Gin框架
  • 基础
  • Spring框架
  • 命令
  • Nginx
  • Ai
  • Deploy
  • Docker
  • K8s
  • Micro
  • RabbitMQ
  • Mysql
  • PostgreSsql
  • Redis
  • MongoDb
  • Html
  • Js
  • 前端
  • 后端
  • Git
  • 知识扫盲
  • Golang
🌟 gitHub

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/ 打开静态文件