NekoVM Application Server
-
Install neko, which includes
mod_neko*.ndllandmod_tora*.ndll(*should be a number). -
Enable mod_neko and mod_tora in the apache configuration file:
LoadModule neko_module path/to/mod_neko*.ndll
LoadModule tora_module path/to/mod_tora*.ndll
AddHandler tora-handler .n
DirectoryIndex index.n
- Compile and launch the tora server.
cd path/to/tora
haxe tora.hxml
neko tora.n
- Compile a index.n, which is the application code.
// Index.hx
class Index {
static function main():Void {
trace("hello world!");
}
}# build.hxml
-neko index.n
-main Index
-
Place
index.nin theDocumentRootas specified by the apache configuration file. -
Visit the address and port (
Listen,ServerName, and/orVirtualHost) as specified by the apache configuration file. It is usuallyhttp://localhost/orhttp://localhost:8080/. The page should showIndex.hx:3: hello world!.