Start a Simple HTTP Server in Any Folder
If you’re needing to quickly test some HTML that you’re working on, start a simple web server within any folder on your Mac. Navigate to the folder to use and enter:
1
$ python -m SimpleHTTPServer 8000
The number at the end is the port to use, open your browser and visit http://localhost:8000 You can use the default of port 80 if you wish and remove the port number entirely.
When you’re finished, simply press Ctrl-C.