Deploying and running code built with OpenFL backend

Hi everybody,

Just wanted to share that if you don’t want to browse across the source files and you need to configure miniweb these are the parameters:
-p port (integer)
-r path (path to dir)
-l logfile (path to file)
-m maxclients (integer)
-d ListDirectories (boolean)

Example:
miniweb.exe -p 80 -r c:\httproot -l c:\miniweb\miniweb.log -m 500 -d 1

I have been experimenting with Haxe and HaxeUI. I am currently experimenting with OpenFL backend. I first created a project using the following command at command prompt :

E:\haxe\projects\project1>haxelib run haxeui-core create openfl

This created the project sub-folders and default minimum code. I didn’t change anything in the code or files.

Next, I compiled and ran it with the following command :

E:\haxe\projects\project1>haxelib run haxeui-core test openfl

The result was as follows :

The command window displayed the following :

running: openfl run html5

running: openfl run html5

and Chrome browser (the default browser in my laptop) opened as displayed a windows with a button with the text ‘Click Me!’ at the top-left of the browser window. When clicked, the button text changed to ‘Thank!’. Well, so far so good.

I closed the command window and tried open the ‘index.html’ file in the build folder. But it displayed a browser window with a horizontal light sky-blue line in the middle but no button!.

Now, here is what I presume : when I ran the command ‘haxelib run haxeui-core test openfl’ command, a hidden web server started running with output code hosted inside it. Hence, the browser displayed the web address “http:\localhost:3000”. But, when I closed the command window, this web server got shutdown and I could no more access the output. Double-clicking and trying to run the index.html file just does not work!

As part of the experiment, I download a small webserver name ‘MiniWeb HTTP Server’ from SourceForge. It was a very small web server. No installation was needed. I extracted it into a folder and just ran the executable file in the command window. Configuring the web service is simple. The command-line parameters are as follows :

To configure miniweb, these are the parameters:

-p port (integer)
-r path (path to dir)
-l logfile (path to file)
-m maxclients (integer)
-d ListDirectories (boolean)

Example:

miniweb.exe -p 80 -r c:\httproot -l c:\miniweb\miniweb.log -m 500 -d 1

I created a folder named ‘site’ in drive E: and a sub-folder under it named ‘log’. Next I issued the following command :

E:\PMN\Downloads\MiniWeb\miniweb>miniweb.exe -p 2000 -r e:\pmn\site -l e:\pmn\site\log -m 500 -d 1

MiniWeb (build 300, built on Feb 28 2013)

©2005-2013 Written by Stanley Huang stanleyhuangyc@gmail.com

Host: 192.168.137.55:2000

Web root: e:\pmn\site

Max clients (per IP): 500 (16)

URL handlers: 2

Next, I typed the following address in the web browser :

http:\localhost:2000

This opened a page with the ‘Click Me!’ button on the top-left corner of the window. When clicked, it changed to ‘Thanks!’.

So, I learned that the output of openfl backend is html files and javascript files which has to be hosted in a webserver for it to work!

If anybody can provide any comments, suggestions or additional helpful information in how to deploy your code produced using Haxe and HaxeUI, you are most welcome!

Nirmal