diff --git a/tutorial/nodejs/Makefile.am b/tutorial/nodejs/Makefile.am
index 2affb9f..ecf3b2b 100644
--- a/tutorial/nodejs/Makefile.am
+++ b/tutorial/nodejs/Makefile.am
@@ -30,9 +30,18 @@
 tutorialclient: all
 	NODE_PATH="$(top_builddir)/lib/nodejs:$(top_builddir)/lib/nodejs/lib:$(NODEPATH)" $(NODEJS) NodeClient.js
 
+tutorialserver_promise: all
+	NODE_PATH="$(top_builddir)/lib/nodejs:$(top_builddir)/lib/nodejs/lib:$(NODEPATH)" $(NODEJS) NodeServerPromise.js
+
+tutorialclient_promise: all
+	NODE_PATH="$(top_builddir)/lib/nodejs:$(top_builddir)/lib/nodejs/lib:$(NODEPATH)" $(NODEJS) NodeClientPromise.js
+
+
 clean-local:
 	$(RM) -r gen-*
 
 EXTRA_DIST = \
 	NodeServer.js \
-	NodeClient.js
+	NodeClient.js \
+	NodeServerPromise.js \
+	NodeClientPromise.js
diff --git a/tutorial/nodejs/NodeClient.js b/tutorial/nodejs/NodeClient.js
index 3d09709..74aa55a 100644
--- a/tutorial/nodejs/NodeClient.js
+++ b/tutorial/nodejs/NodeClient.js
@@ -68,7 +68,7 @@
 work.num2 = 10;
 
 client.calculate(1, work, function(err, message) {
-  console.log('15-10=' + message.value);
+  console.log('15-10=' + message);
 
   client.getStruct(1, function(err, message){
     console.log('Check log: ' + message.value);
diff --git a/tutorial/nodejs/NodeClientPromise.js b/tutorial/nodejs/NodeClientPromise.js
new file mode 100644
index 0000000..7bcf884
--- /dev/null
+++ b/tutorial/nodejs/NodeClientPromise.js
@@ -0,0 +1,82 @@
+/*
+ * 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 ThriftTransports = require('thrift/transport');
+var ThriftProtocols = require('thrift/protocol');
+var Calculator = require('./gen-nodejs/Calculator');
+var ttypes = require('./gen-nodejs/tutorial_types');
+
+
+transport = ThriftTransports.TBufferedTransport()
+protocol = ThriftProtocols.TBinaryProtocol()
+
+var connection = thrift.createConnection("localhost", 9090, {
+  transport : transport,
+  protocol : protocol
+});
+
+connection.on('error', function(err) {
+  assert(false, err);
+});
+
+// Create a Calculator client with the connection
+var client = thrift.createClient(Calculator, connection);
+
+
+client.ping()
+  .then(function() {
+    console.log('ping()');
+  });
+
+client.add(1,1)
+  .then(function(response) {
+	  console.log("1+1=" + response);
+  });
+
+work = new ttypes.Work();
+work.op = ttypes.Operation.DIVIDE;
+work.num1 = 1;
+work.num2 = 0;
+
+client.calculate(1, work)
+  .then(function(message) {
+	console.log('Whoa? You know how to divide by zero?');
+  })
+  .fail(function(err) {
+    console.log("InvalidOperation " + err);
+  });
+
+
+work.op = ttypes.Operation.SUBTRACT;
+work.num1 = 15;
+work.num2 = 10;
+
+client.calculate(1, work)
+  .then(function(value) {
+	  console.log('15-10=' + value);
+	  return client.getStruct(1);
+  })
+  .then(function(message) {
+      console.log('Check log: ' + message.value);
+  })
+  .fin(function() {
+	  //close the connection once we're done
+      connection.end();
+  });
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);
