In Python 2.X running python -m simpleHTTPserver starts a web server on port 8000 from the current directory.
In Python 3.X the new way to start up a simple http server is python3 -m http.server
By default the webserver spawned will use port 8000. You can specify a port after http.server
python3 -m http.server 9000
Starting http server:
Browsing the web server, locally with http://localhost:8000, notice you can now view/download/etc files from the directory the script was run from.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.