THRIFT-5811: Update eslint & prettier
Client: js
Patch: Cameron Martin
This closes #3087
diff --git a/lib/nodejs/examples/hello.js b/lib/nodejs/examples/hello.js
index 8b7c4e4..5f1b682 100644
--- a/lib/nodejs/examples/hello.js
+++ b/lib/nodejs/examples/hello.js
@@ -16,46 +16,46 @@
* specific language governing permissions and limitations
* under the License.
*/
-var thrift = require('thrift');
-var HelloSvc = require('./gen-nodejs/HelloSvc.js');
-var TimesTwoSvc = require('./gen-nodejs/TimesTwo.js');
+var thrift = require("thrift");
+var HelloSvc = require("./gen-nodejs/HelloSvc.js");
+var TimesTwoSvc = require("./gen-nodejs/TimesTwo.js");
var helloHandler = {
- hello_func: function(result) {
- this.call_counter = this.call_counter || 0;
- console.log("Client call: " + (++this.call_counter));
- result(null, "Hello Apache Thrift for JavaScript " + this.call_counter);
- }
-}
+ hello_func: function (result) {
+ this.call_counter = this.call_counter || 0;
+ console.log("Client call: " + ++this.call_counter);
+ result(null, "Hello Apache Thrift for JavaScript " + this.call_counter);
+ },
+};
var timesTwoHandler = {
- dbl: function(val, result) {
- console.log("Client call: " + val);
- result(null, val * 2);
- }
-}
+ dbl: function (val, result) {
+ console.log("Client call: " + val);
+ result(null, val * 2);
+ },
+};
var helloService = {
- transport: thrift.TBufferedTransport,
- protocol: thrift.TJSONProtocol,
- processor: HelloSvc,
- handler: helloHandler
+ transport: thrift.TBufferedTransport,
+ protocol: thrift.TJSONProtocol,
+ processor: HelloSvc,
+ handler: helloHandler,
};
var dblService = {
- transport: thrift.TBufferedTransport,
- protocol: thrift.TJSONProtocol,
- processor: TimesTwoSvc,
- handler: timesTwoHandler
+ transport: thrift.TBufferedTransport,
+ protocol: thrift.TJSONProtocol,
+ processor: TimesTwoSvc,
+ handler: timesTwoHandler,
};
var ServerOptions = {
- files: ".",
- services: {
- "/hello": helloService,
- "/dbl": dblService,
- }
-}
+ files: ".",
+ services: {
+ "/hello": helloService,
+ "/dbl": dblService,
+ },
+};
var server = thrift.createWebServer(ServerOptions);
var port = 8585;