Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] 使用 Python 内置服务器模块 #9

Open
yangruihan opened this issue Sep 26, 2020 · 0 comments
Open

[Python] 使用 Python 内置服务器模块 #9

yangruihan opened this issue Sep 26, 2020 · 0 comments

Comments

@yangruihan
Copy link
Owner

使用 Python 内置服务器模块

命令行切换到对应目录,执行下面命令

  • Python2:

    python -m SimpleHTTPServer
  • Python3

    python -m http.server

此时访问127.0.0.1:8000就会访问该目录下的index.html,测试用非常方便

@yangruihan yangruihan changed the title 使用 Python 内置服务器模块 [Python] 使用 Python 内置服务器模块 Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant