开发者

Writing a Web Application in Haxe without Apache and PHP?

开发者 https://www.devze.com 2022-12-24 05:17 出处:网络
Haxe has Apache httpd modules and can compile to PHP code. These are 2 options I know to make a web application that runs on the server. You can start a http server with nekotools, but this is suppose

Haxe has Apache httpd modules and can compile to PHP code. These are 2 options I know to make a web application that runs on the server. You can start a http server with nekotools, but this is supposed to be used for development only.

Are there any more options?

I can always use the NekoVM from within a C or C++ program, running a web server or interfacing to FastCGI. Or compile to C++, using a FastCGI or we开发者_JAVA百科b server library. But I want to hear about solutions that are actually used.

I have a VPS with nginx, so no mod_neko or mod_tora. PHP isn't a problem, but I'd rather wouldn't use it (for irrational reasons).


More correctly there is an Apache module for the nekoVM. (You do need necessarily haxe to produce neko binaries)

To your question:

  • As far as I know there is currently no possibility to use the C++ target for webserver application, but some people are playing arround with some stuff.
  • As you said, you could use PHP
  • mod_tora or mod_neko on a Apache setup. (Why not use Apache?)
  • OR: the probably most interessting thing for you be: Link 1 and Link 2 (neko as cgi / fastcgi)


hxNode uses node.js. Don't know if anybody uses hxNode, but node.js got some good press lately.


I'm continuing to keep hxNode up to date and expanding it with the node.js spec. I'm using it for my own projects and debugging it as I come across stuff.

Currently, hxNode, has the node.js api defined in Haxe, this is the standard node.js asynchronous API. Also, I've started to recreate the Haxe standard API using this API, so for example, js.FileSystem has been implemented, this makes use of the fact that latest versions of node can call fs module syncronously.

Other things which I'm working on with this API, servlet's sitting on top, and mongo bindings based on chriskv's mongo native drivers.

bd

0

精彩评论

暂无评论...
验证码 换一张
取 消