One liner…

March 18, 2004 | Python | By: Mark VandeWettering

Ever wish you had a simple webserver on a machine? You can do it in a single
line with Python.

python -c "import SimpleHTTPServer ; SimpleHTTPServer.test()"

This will start a webserver on port 8000 in the current directory, and allow you to serve content for any files in that directory.