I was looking for a oneliner to start a HTTP server and serve static content from a directory. Python's
SimpleHTTPServer is the perfect match for the job.
Python is already installed by most linux distributions by default and it's easily available for a lot of other platforms as well. Starting your own little HTTP server was never easier than this:
python2 -m SimpleHTTPServer 8080
And to access it, open the http://localhost:8080/ URL.
Comments
Re: An easy way to start a HTTP server serving static content
python3 -m http.server 8080 --bind 127.0.0.1