Home > Article > Backend Development > Simple way to create httpServer with Python3
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!