A quick and simple webserver in Mac OS X
To start a simple webserver on Mac OS X simply start terminal, go to the directory you want to start the webserver from (which will be the document root) and use the following command:
python -m SimpleHTTPServer 8080
That directory will be available in the browser at http://localhost:8080
Written by Martijn van Maasakkers
Related protips
2 Responses
Same can be done with PHP:
php -S localhost:8080
over 1 year ago
·
in Ruby: ruby -run -e httpd . -p 8000
Here is a list actually https://gist.github.com/willurd/5720255
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mac os x
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#