Prev | Current Page 457 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


To compile, just open the command - prompt/console, navigate to the project directory, and execute the
following command:
> haxe HelloWorld.hxml
This produces the file hello.n that can be executed by the web server.
On a Windows machine, a double - click on an .hxml file will execute the same command as in the
previous example.
To see the result of this small exercise, navigate in the web directory of the project and launch the
command:
> nekotools server
The Neko web server is now active and ready to receive requests. Open your Internet browser and point
it to the following URI:
http://localhost:2000/hello.n
The result is a very simple HTML page that reports the hello message in big words.
Now the process of building individual Neko pages can be repeated at will. A single .hxml file can
compile many Neko files at once, just repeat as many compile sections separated by the - - next switch.
The page controller approach works fine for very small sites but on a larger scale it is not very good.
Codes tend to be repeated unnecessarily and the number of files to manage and deploy grows very fast.


Pages:
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469