httpd library and missed opportunity.

Alex Tweedly alex at tweedly.net
Tue Aug 1 17:16:36 EDT 2017


[ started a new thread, so I can't rant without tainting the other thread ]

I started out on the 'find a rev/livecode solution for a simple HTTP 
server" for one small reason :

    the LC 9.0 Dictionary Guide, under "HTML5 Deployment" says

> Testing your HTML5 app with a local web server
> Some browsers, such as Google Chrome, do not permit pages to download 
> resources from file:// URLs. You won't be able to test your 
> application in these browsers unless you run a local HTTP server.
>
> A quick and easy way to run a simple local HTTP server is to use 
> Python. Open a terminal window, change directory to your standalone's 
> directory, and run:
>
> python -m SimpleHTTPServer 8080
> This will let you access your standalone by opening your web browser 
> and visiting http://localhost:8080.
>
What ?  IMO, this is just plain "wrong".

This is like going into the BMW dealership and being told "Yeah, you'll 
love the way the new Z4 drives. Just get into this Mercedes sports car 
here and we'll take you over to the racetrack to watch someone else 
drive one."

Why are we suggesting that users use another (OK, a "competing") 
scripting language to test HTML5 deployment ?

Livecode is perfectly able to run a simple HTTP server. It is perfectly 
possible and not too hard to write a basic one. In fact, we now even 
have an included library that makes it trivial to write that very basic 
server.

Why didn't we (i.e. Livecode - a careful use of the word  "we") just 
package up that simple server, and then include that, with suitable 
instructions.

That would have avoided any implication that LC is any less capable than 
other scripting languages, and avoided reminding anyone that LC doesn't 
(yet) come packaged with all the libraries and therefore utilities that 
you could hope for.


So - I'm hoping to write a basic version (including my "get around the 
same-domain limitation") and get it, or something like it, included in 
the LC distribution, so that the documentation has no need to recommend 
another language.

<end of rant - thanks for listening :-)>

Alex.






More information about the Use-livecode mailing list