Switching from PHP to NodeJS in Haxe

72 views
Skip to first unread message

Rafael Oliveira

unread,
Aug 25, 2017, 1:45:06 PM8/25/17
to Haxe
Hi, I'm switching from the PHP target to NodeJS, but I still don't have experience with NodeJS, so I'd like to know if the class haxe.web.Dispatch and the packages in haxe.remoting could be used with NodeJS.

michael solomon

unread,
Aug 25, 2017, 9:05:01 PM8/25/17
to Haxe
Hey,
Accord to haxe API both Dispatch and Remoting is under haxe package, so it's looks like it's will be seamlessly.

Rafael Oliveira

unread,
Aug 25, 2017, 11:58:12 PM8/25/17
to Haxe
Seeing now, Dispatch.run() needs to be used with php.Web.getURI() and php.Web.getParams() (or neko.Web), so, its not available on js target, because NodeJS is a different thing. Maybe I need to study how this can be integrated with the Http module or Express.

michael solomon

unread,
Aug 26, 2017, 4:41:32 PM8/26/17
to Haxe
You just need to pass in the query string as an Map<String,String> and the url.. shoule be something like this

Rafael Oliveira

unread,
Aug 26, 2017, 8:18:00 PM8/26/17
to Haxe
Thanks, I will try this.
Reply all
Reply to author
Forward
0 new messages