[
https://issues.apache.org/jira/browse/THRIFT-2164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13763150#comment-13763150
]
Henrique Mendonça commented on THRIFT-2164:
-------------------------------------------
Hi Randy,
Yeah, I think normally you'd have a static web server (for the static files)
and possibly add multiple thrift http servers to handle different thrift
services, i.e. /service1, /service2 or /api/bin, /api/json and so on.
It would be nice if we could even use the already existing HTTP/JSON server
implementation (i.e. createHttpServer) but it might not be very trivial to do
so...
{code}
var server =
thrift.createStaticHttpServer(
proxy: {
"/my_custom_uri": thrift.createHttpServer(...),
"/my_custom_uri2": thrift.createHttpServer(...)
}
}
);
{code}
something like that? or do you (or anyone else) have a better idea?
but I think if you could get this working with just one service it's already
enough for the testing and a very valid patch! So it's totally your call.
Cheers,
Henrique
> Add a Get/Post Http Server to Node along with examples
> ------------------------------------------------------
>
> Key: THRIFT-2164
> URL: https://issues.apache.org/jira/browse/THRIFT-2164
> Project: Thrift
> Issue Type: New Feature
> Components: Node.js - Library
> Affects Versions: 0.9.2
> Environment: Tested on Windows 7 and Ubuntu 12
> Reporter: Randy Abernethy
> Assignee: Randy Abernethy
> Priority: Minor
> Labels: nodejs
> Attachments:
> 0001-added-createHttpGetPostServer-to-node-with-examples.patch
>
>
> This patch adds a createHttpGetPostServer() function to the Node.js library
> allowing a server to be created which will serve pages as well as handle
> Thrift RPC. This is convenient in avoiding cross domain browser issues for
> testing among other things. In particular, Browser based html/JavaScript can
> be loaded from the node server and Thrift RPC calls can be made subsequently
> to the same server. The patch includes a demo with a hello.html (the browser
> client), hello.js (the node server) and hello.thrift (the service
> definition).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira