diff --git a/tutorial/nodejs/NodeServerPromise.js b/tutorial/nodejs/NodeServerPromise.js
new file mode 100644
index 0000000..4fd0a35
--- /dev/null
+++ b/tutorial/nodejs/NodeServerPromise.js
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+var thrift = require("thrift");
+var Calculator = require("./gen-nodejs/Calculator");
+var ttypes = require("./gen-nodejs/tutorial_types");
+var SharedStruct = require("./gen-nodejs/shared_types").SharedStruct;
+
+var data = {};
+
+var server = thrift.createServer(Calculator, {
+  ping: function() {
+    console.log("ping()");
+  },
+
+  add: function(n1, n2) {
+    console.log("add(", n1, ",", n2, ")");
+    return n1 + n2;
+  },
+
+  calculate: function(logid, work) {
+    console.log("calculate(", logid, ",", work, ")");
+
+    var val = 0;
+    if (work.op == ttypes.Operation.ADD) {
+      val = work.num1 + work.num2;
+    } else if (work.op === ttypes.Operation.SUBTRACT) {
+      val = work.num1 - work.num2;
+    } else if (work.op === ttypes.Operation.MULTIPLY) {
+      val = work.num1 * work.num2;
+    } else if (work.op === ttypes.Operation.DIVIDE) {
+      if (work.num2 === 0) {
+        var x = new ttypes.InvalidOperation();
+        x.what = work.op;
+        x.why = 'Cannot divide by 0';
+		throw x;
+      }
+      val = work.num1 / work.num2;
+    } else {
+      var x = new ttypes.InvalidOperation();
+      x.what = work.op;
+      x.why = 'Invalid operation';
+      throw x;
+    }
+
+    var entry = new SharedStruct();
+    entry.key = logid;
+    entry.value = ""+val;
+    data[logid] = entry;
+    return val;
+  },
+
+  getStruct: function(key) {
+    console.log("getStruct(", key, ")");
+    return data[key];
+  },
+
+  zip: function() {
+    console.log("zip()");
+  }
+
+});
+
+server.listen(9090);
