Andy Davies is a Software Development Engineer for Skype in London. He's a fan of clean code and building great stuff.

Simple HTTP server on Mac OS X in seconds…

Came across this great tip the other day. If your project is just html, css & javascript and you don’t want to bother faffing around with apache configs. On Mac OS X you can run the following 2 commands:


> cd /path/to/project/folder
> python -m SimpleHTTPServer 8080

The beauty of this is that all macs come with python already installed. So it’s just up and running, no hassel, you can then hit http://localhost:8080 to see the site. Of course you can change the port number to something other than 8080.

More can be read about this at http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python

It literally took you longer to read all that than it will to get this going.

This entry was posted in Javascript. Bookmark the permalink.

3 Responses to Simple HTTP server on Mac OS X in seconds…

  1. Pingback: How to download the jQuery Mobile documentation for offline viewing | Mitch Fournier

  2. Justin Kitagawa says:

    Is it possible to then shut down the server?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

my profile image