Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- It creates a Simple HTTP Server, that turns the current directory into your web server directory, that gives you an opportunity to share files from it over HTTP.
- # For Python >=2.4
- python -m SimpleHTTPServer
- # For Python 3.x
- python -m http.server
- Now you can access the shared folder by visiting http://your_ip_address:8000.
- By default Simple HTTP Server will listen to 0.0.0.0:8000, but port number can be changed :
- # For Python >=2.4
- python -m SimpleHTTPServer 8888
- # For Python 3.x
- python -m http.server 8888
- 0.0.0.0 - means that the server is not bound to a specific address, and will listen on all configured network interfaces.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement