Simple HTTP Server for testing a static site
July 14, 2012;
1 min read
I can’t believe I didn’t know about this earlier, but if you have html/css/js files for a static website in directory /path/to/foo, you can serve it on port 9000 (or whatever) by running
cd /path/to/foo
python -m SimpleHTTPServer 9000
It’s nice because file:// urls don’t let you do nice things like ajax, etc.
Share
Tags
Similar Articles
20 Years of Designing Under the Mango Tree
On Dimagi's 20th Anniversary, this blog reflects on the foundation of Designing Under the Mango Tree, our user-centric approach of building solutions based on users' contextual needs, and includes conversations with some of the first users of CommCare.
Staff Blog
December 20, 2022