Created
December 27, 2011 13:29
-
-
Save julianshen/1523666 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var thrift = require('thrift'); | |
var Computer = require('./gen-nodejs/Computer.js'), | |
ttypes = require('./gen-nodejs/computer_types.js'); | |
var server = thrift.createServer(Computer, { | |
add: function(a, b, callback) { | |
console.log("function called:", a+b); | |
callback(a+b); | |
}, | |
}); | |
server.listen(6116); | |
console.log('Server started at port 6116'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment