Home > Backend Development > Python Tutorial > Simple way to create httpServer with Python3

Simple way to create httpServer with Python3

不言
Release: 2018-06-04 11:00:14
Original
5070 people have browsed it

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()
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template