Neko web server not running main.n

I have a Neko web server that is supposed to run main.n when I do nekotools server. But when I navigate to localhost:2000 all I get in response is this:

I have a folder called html and in it contains one file index.mtt which contains the following text:

            <title>Neko Tutorial</title>

            <h1>Hello, there ::name::!</h1>

Wow, discourse really does not like HTML tags in pre-formatted text! But regardless, that’s what my HTML page looks like.

I then have an src folder containing Main.hx with the following code:


    import sys.db.Types;
    import haxe.Template;

    class Main
        public static function main()
            var str = haxe.Resource.getString("index");
            var t = new Template(str);
            var output = t.execute({ name: "tienery" });

I then have my run.bat - haxe -cp src/ -neko main.n -main Main -resource html/[email protected]

When I run it, Haxe does not throw any errors and compiles successfully, giving me back main.n in the root folder. But as mentioned, nekotools server does not seem to be picking this bytecode up and executing it on the webpage, so any thoughts as to why this might be the case?

I’m using Haxe 3.2.1.

What if you go to http://localhost:2000/main.n?

Maybe worth trying with an index.n,
or there could be some option to add to support url rewriting,
but it could just be that the nekotool server doesn’t support it.

If you need more look at mod_tora

Ah, that’s interesting. Of course why I didn’t think that index.n, just like index.htm would work naturally, because obviously it’s a website. I suspect some dispatching would be required to make hierarchical URLs work with Neko, but that’s good to know.