How to do local testing for HAniS - the HTML5 AnimationS webapp

Page updated: March, 2015

It is sometimes desireable to test HAniS "locally" -- that is creating and using all the necessary files (config, file_of_filenames, images, etc) from your desktop machine instead of putting everything on an actual HTTP Server and testing from there.

Unfortunately, some browsers (most notably, Chrome) do not allow the JavaScript code to read image files from the local machine. This problem manifests itself by simply not showing the fact, it may not even allow you to read the config file!

The recommended way around this is to run an HTTP Server on your desktop (local) machine...and the easiest way to do that is to install Python and then:

  1. cd directory_of_your.html
  2. python -m SimpleHTTPServer
You will get a response like:
Serving HTTP on port 8000 ...

Then in your web browser, you would enter a URL like this:

And your browser should be happy....

Please remember if you have problems, you can put the debug=true option in your config file. In addition, some browsers have a built-in debugger which can sometimes help. In Chrome and Firefox, you invoke this by typing CTRL+SHIFT+i

Back to the HAniS homepage