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
31
vendor/git.apache.org/thrift.git/lib/nodejs/examples/httpServer.js
generated
vendored
Normal file
31
vendor/git.apache.org/thrift.git/lib/nodejs/examples/httpServer.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
var thrift = require('thrift');
|
||||
var helloSvc = require('./gen-nodejs/HelloSvc');
|
||||
|
||||
//ServiceHandler: Implement the hello service
|
||||
var helloHandler = {
|
||||
hello_func: function (result) {
|
||||
console.log("Received Hello call");
|
||||
result(null, "Hello from Node.js");
|
||||
}
|
||||
};
|
||||
|
||||
//ServiceOptions: The I/O stack for the service
|
||||
var helloSvcOpt = {
|
||||
handler: helloHandler,
|
||||
processor: helloSvc,
|
||||
protocol: thrift.TJSONProtocol,
|
||||
transport: thrift.TBufferedTransport
|
||||
};
|
||||
|
||||
//ServerOptions: Define server features
|
||||
var serverOpt = {
|
||||
services: {
|
||||
"/hello": helloSvcOpt
|
||||
}
|
||||
}
|
||||
|
||||
//Create and start the web server
|
||||
var port = 9090;
|
||||
thrift.createWebServer(serverOpt).listen(port);
|
||||
console.log("Http/Thrift Server running on port: " + port);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue