ONE line to start a simple HTTP server in Python
You need a quick http access for a folder, and you don't want to go through nginx/apache setup.
Luckily, python has a very simple way to do it.
Yes, just one line.
to start HTTP server for the current directory, port by default 8000.
$ python -m http.server
Access via http://127.0.0.1:8000.
with a specific directory:
$ python -m http.server -d /tmp/
Access /tmp via http://127.0.0.1:8000
Access /tmp via http://127.0.0.1:8000
specify port:
$ python -m http.server 8080
Access current directory via http://127.0.0.1:8080
Great article by the great author, it is very massive and informative but still preaches the way to sounds like that it has some beautiful thoughts described so I really appreciate this article.Best tracer router service provider
ReplyDelete