[
https://issues.apache.org/jira/browse/THRIFT-3833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295256#comment-15295256
]
ASF GitHub Bot commented on THRIFT-3833:
----------------------------------------
Github user oprudkyi commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1013#discussion_r64140128
--- Diff: tutorial/haxe/src/Main.hx ---
@@ -51,14 +51,44 @@ class Main {
private static var targetPort : Int = 9090;
static function main() {
- #if ! (flash || js)
+
+ #if ! (flash || js || phpwebserver)
try {
ParseArgs();
} catch (e : String) {
trace(e);
trace(GetHelp());
return;
}
+
+ #elseif phpwebserver
--- End diff --
also, just sample how it looks in a real server
php side:
```php
<?php
namespace App\Libs\Tsp;
function tsp_trace_function($message)
{
\Log::info($message);
}
require_once dirname(__FILE__) .
'/../../../tsp_handler_web/tsp_web_handler.php';
```
haxe side:
```haxe
static public function main()
{
//remap trace
haxe.Log.trace = function(v:Dynamic, ?infos:haxe.PosInfos)
{
....
untyped __call__('App\\Libs\\Tsp\\tsp_trace_function',
'${msg}${newValue}');
}
}
```
> haxe http server implementation (by embeding into php web server)
> -----------------------------------------------------------------
>
> Key: THRIFT-3833
> URL: https://issues.apache.org/jira/browse/THRIFT-3833
> Project: Thrift
> Issue Type: Improvement
> Components: Haxe - Library
> Affects Versions: 1.0
> Reporter: Oleksii Prudkyi
> Assignee: Oleksii Prudkyi
>
> provide way to run haxe servers to run as part of ordinal web server (i.e.
> php code generated from haxe)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)