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

Page updated: December, 2018


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 and Firefox) do not allow the JavaScript code to read image files from the local machine. This problem manifests itself by simply not showing the images...in fact, it may not even allow you to read the config file!

The recommended way around this is to temporarily 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
    or, for Python 3: python -m http.server
You will get a response like:
Serving HTTP on 0.0.0.0 port 8000 ...

Then in your web browser, you would enter a URL like this:
http://localhost:8000/your.html

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