automeris-io / WebPlotDigitizer

Computer vision assisted tool to extract numerical data from plot images.
https://automeris.io
GNU Affero General Public License v3.0
2.61k stars 360 forks source link

HTTP Server #2

Closed vinodkhare closed 13 years ago

vinodkhare commented 13 years ago

I see some python HTTP servers have been provided. How does one use them?

ankitrohatgi commented 13 years ago

They are very basic HTTP servers to aid development work when you don't want to install or do not have access to a web server. Python has a very basic HTTP server module included in most Windows and Linux distributions and that can be used as following:

python -m http.server (Python version 3.0+)

python -m SimpleHTTPServer (Older Python)

[Ref: http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python]

The above commands create an HTTP server serving the files in the current directory on the port 8000.

The python files that are included here basically do the same as above, but offer the flexibility of changing the default port or adding more features in the future. [Ref: http://docs.python.org/library/simplehttpserver.html]

To use these files instead of the above, you can just type:

python HTTPServer.py

or

python HTTPServer31.py (Python 3.0+)

To change the port on which the server is created, just edit the relevant file.

ankitrohatgi commented 13 years ago

The main reason for having all this is because the code no longer works in an offline mode because the getImageData() function is not allowed to access data in offline mode by either Firefox or Chrome. The application has to be accessed via a web server at all times for this reason.

vinodkhare commented 13 years ago

Yes, I tried to run the latest version but it wasn't working.

ankitrohatgi commented 13 years ago

This should be up and running most of the time: http://71.229.86.124/WebPlotDigitizer/

It's the latest version. Work has kind of slowed down recently, lots of other stuff to take care of right now.