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)
Written by Charles Armitage
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#