Quote for 2014-02-05

PUBLISHED ON FEB 5, 2014 — IMPORTED FROM TUMBLR, QUOTE

Open up a terminal and type:

$ cd /home/somedir
$ python -m SimpleHTTPServer

That’s it! Now your http server will start in port 8000. You will get the message:

Serving HTTP on 0.0.0.0 port 8000 …

Now open a browser and type the following address:

http://192.168.1.2:8000

You can also access it via:

http://127.0.0.1:8000

If the directory has a file named index.html, that file will be served as the initial file. If there is no index.html, then the files in the directory will be listed.



http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python

This has been super helpful for getting a server running locally for testing the browser’s built-in geolocation service.