Last Updated: February 25, 2016
·
501
· charlesarmitage

Quick simple web server

Need a quick web server to server up some pages and javascript. Trying out different javascript front ends?

One of the quickest ways to get a web server running on any machine with Python is to run:

python -m SimpleHTTPServer

from the directory containing your pages and app etc. This will serve pages from the directory on localhost:8000. Easy.
(Add a port number at the end to use a different port.)

(Got this tip from one of the answers to this question: http://stackoverflow.com/questions/2113117/web-server-for-testing-on-linux)