http

Tip: serve local files over HTTP with one console command

This weekend I was playing with Facebook’s JavaScript¬†SDK and I needed a quick way to serve over HTTP¬†the files I was working on, so that I could access them in a browser window at http://localhost. I didn’t want to go through the hassle of setting up Apache on my Mac, though, and I was looking for some quick alternative to installing a local web server. After some Googling, I found a wonderful one liner that did the job, provided that you have Python installed.