generate Neko sourcecode that can be used on the Server side or in standalone executable.

Each of theses platforms have their own API, but they share the same programming language and the same standard library, so if your classes are pure code (using no platform-specific API) then they can be compiled and used everywhere, depending on your needs.

To clarify: haXe isn’t a set of cross-platform widgets and libraries, but is instead a standard syntax for loops, data structures, and so on. Syntax is Java-like:

Some Ajax apps have business logic (e.g. validation) inside the browser to speed things up, but also have to duplicate the logic in the server, for the sake of security. One way to manage the duplication is with server-side Javascript, but haXe might make a good alternative.