Python's SimpleHTTPServer is a really easy way to get a localhost up and running. Just type:
python -m SimpleHTTPServer 8888
and your current working directory is running a server at http://localhost:8888/. But typing that is tedious—here's how to make it an alias instead (on a Mac/UNIX install).
echo "alias pysrv='python -m SimpleHTTPServer'" >> ~/.bash_profile source ~/.bash_profile
Now, you can just type
and get a web server. Much easier to remember!
(NOTE: ~/.bashrc is a more traditional place for this, but a default OS X setup has no ~/.bashrc file. If you have one, put the alias there instead of ~/.bash_profile)