Tuesday 20 September 2016

Quick and Simple HTTP Server on OSX using python

First enter the directory that you would like to access over http.
cd ~/Desktop

Execute the following command to access the directory using your web browser on port 8888.
python -m SimpleHTTPServer 8888

Alternatively execute the command with root privilege to start the simple http server on port 80.
sudo python -m SimpleHTTPServer 80

No comments:

Post a Comment