Easily Serve a Directory via HTTP (with concurrency support)
You can use Python's SimpleHTTPServer module to serve a directory via HTTP, but you must keep in mind that it can only support one connection at a time. This can annoying if you intent to serve several big files and download them simultaneously. Fortunately, we have Twisted to the rescue!
twistd -n web --path=./
You can then proceed to access the HTTP server on port 8080. The server support multiple concurrent connection, enabling you (and your friends/coworkers) to download multiple big files concurrently.
You need Python 2.x and Twisted installed in order to use this command.
Written by Arif Widi Nugroho
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#