Checking in vendor folder for ease of using go get.
This commit is contained in:
parent
7a1251853b
commit
cdb4b5a1d0
3554 changed files with 1270116 additions and 0 deletions
vendor/git.apache.org/thrift.git/lib/nodejs/examples
19
vendor/git.apache.org/thrift.git/lib/nodejs/examples/httpServer.py
generated
vendored
Normal file
19
vendor/git.apache.org/thrift.git/lib/nodejs/examples/httpServer.py
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
import sys
|
||||
sys.path.append('gen-py')
|
||||
|
||||
from hello import HelloSvc
|
||||
from thrift.protocol import TJSONProtocol
|
||||
from thrift.server import THttpServer
|
||||
|
||||
class HelloSvcHandler:
|
||||
def hello_func(self):
|
||||
print "Hello Called"
|
||||
return "hello from Python"
|
||||
|
||||
processor = HelloSvc.Processor(HelloSvcHandler())
|
||||
protoFactory = TJSONProtocol.TJSONProtocolFactory()
|
||||
port = 9090
|
||||
server = THttpServer.THttpServer(processor, ("localhost", port), protoFactory)
|
||||
print "Python server running on port " + str(port)
|
||||
server.serve()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue