[
https://issues.apache.org/jira/browse/THRIFT-3833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15294962#comment-15294962
]
ASF GitHub Bot commented on THRIFT-3833:
----------------------------------------
Github user Jens-G commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1013#discussion_r64133311
--- 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 --
I would like to have all those "//remap trace to error log" sections
reafctored into a dedicated method. As it is now, it bloats the main() method
with stuff that definitely belongs onto a different level of abstraction. The
main method serves two purposes: parsing args (or similar) to set up the
system, then start the right program mode. Aside from some added root level
error handling, that's it and that should be it. Anything else belongs into
either the first part, or the second.
Considereing the fact that we seem to need the same code over and over
again for PHP (see your own README changes), why don't we put the stuff it into
a library utility function, preventing the need for further copy+paste
programming?
> 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)