THRIFT-2964: nodejs file breakout
Client: NodeJS
Patch: Andrew de Andrade
Moves protocols and transports (among others) into seperate files.
diff --git a/lib/nodejs/test/http_server.js b/lib/nodejs/test/http_server.js
index f12e695..3519f4a 100644
--- a/lib/nodejs/test/http_server.js
+++ b/lib/nodejs/test/http_server.js
@@ -36,31 +36,31 @@
var transport = thrift.TBufferedTransport;
if (program.transport === "framed") {
transport = thrift.TFramedTransport;
-}
+}
var protocol = thrift.TBinaryProtocol;
if (program.protocol === "json") {
protocol = thrift.TJSONProtocol;
-}
+}
var handler = ThriftTestHandler;
if (program.promise) {
handler = ThriftTestHandlerPromise;
-}
+}
-var SvcOpt = {
- handler: handler,
- processor: ThriftTest,
- protocol: protocol,
- transport: transport
-};
-var serverOpt = { services: { "/test": SvcOpt } };
+var SvcOpt = {
+ handler: handler,
+ processor: ThriftTest,
+ protocol: protocol,
+ transport: transport
+};
+var serverOpt = { services: { "/test": SvcOpt } };
if (program.ssl) {
serverOpt.tls = {
key: fs.readFileSync(path.resolve(__dirname, 'server.key')),
cert: fs.readFileSync(path.resolve(__dirname, 'server.crt'))
};
}
-thrift.createWebServer(serverOpt).listen(9090);
+thrift.createWebServer(serverOpt).listen(9090);