Home  >  Article  >  Backend Development  >  Simple way to create httpServer with Python3

Simple way to create httpServer with Python3

不言
不言Original
2018-06-04 11:00:145046browse

This article mainly introduces the simple method of creating httpServer with Python3, which has certain reference value. Now I share it with you. Friends in need can refer to it

See Some posts talk about the simple way to create httpserver, as follows:

import SimpleHTTPServer
SimpleHTTPServer.test()

But this module cannot be found at all in Python3*.

Looking at the official manual, I found this is how it came about. Run the following in the specified folder

python -m http.server 8000

and then enter 127.0.0.1:8000 in the browser to see the effect.

It’s so convenient.

Related recommendations:

Python implements a simple http server

The above is the detailed content of Simple way to create httpServer with Python3. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn