diff --git a/tutorial/Makefile.am b/tutorial/Makefile.am
index 5f65802..6fc9209 100755
--- a/tutorial/Makefile.am
+++ b/tutorial/Makefile.am
@@ -46,6 +46,10 @@
 SUBDIRS += go
 endif
 
+if WITH_NODEJS
+SUBDIRS += nodejs
+endif
+
 #
 # generate html for ThriftTest.thrift
 #
@@ -53,8 +57,8 @@
 	$(top_builddir)/compiler/cpp/thrift --gen html -r $(top_srcdir)/tutorial/tutorial.thrift
 endif
 
-# Any folders or files not listed above being added to SUBDIR need to be placed here in 
-# EXTRA_DIST to be included in the release 
+# Any folders or files not listed above being added to SUBDIR need to be placed here in
+# EXTRA_DIST to be included in the release
 EXTRA_DIST = \
 	csharp \
 	d \
diff --git a/tutorial/nodejs/Makefile.am b/tutorial/nodejs/Makefile.am
new file mode 100644
index 0000000..2affb9f
--- /dev/null
+++ b/tutorial/nodejs/Makefile.am
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+THRIFT = $(top_builddir)/compiler/cpp/thrift
+
+gen-nodejs/Calculator.js gen-nodejs/SharedService.js: $(top_srcdir)/tutorial/tutorial.thrift
+	$(THRIFT) --gen js:node -r $<
+
+all-local: gen-nodejs/Calculator.js
+
+tutorialserver: all
+	NODE_PATH="$(top_builddir)/lib/nodejs:$(top_builddir)/lib/nodejs/lib:$(NODEPATH)" $(NODEJS) NodeServer.js
+
+tutorialclient: all
+	NODE_PATH="$(top_builddir)/lib/nodejs:$(top_builddir)/lib/nodejs/lib:$(NODEPATH)" $(NODEJS) NodeClient.js
+
+clean-local:
+	$(RM) -r gen-*
+
+EXTRA_DIST = \
+	NodeServer.js \
+	NodeClient.js
diff --git a/tutorial/nodejs/NodeClient.js b/tutorial/nodejs/NodeClient.js
new file mode 100644
index 0000000..3d09709
--- /dev/null
+++ b/tutorial/nodejs/NodeClient.js
@@ -0,0 +1,79 @@
+/*
+ * 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(function(err, response) {
+  console.log('ping()');
+});
+
+
+client.add(1,1, function(err, 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, function(err, message) {
+  if (err) {
+    console.log("InvalidOperation " + err);
+  } else {
+    console.log('Whoa? You know how to divide by zero?');
+  }
+});
+
+work.op = ttypes.Operation.SUBTRACT;
+work.num1 = 15;
+work.num2 = 10;
+
+client.calculate(1, work, function(err, message) {
+  console.log('15-10=' + message.value);
+
+  client.getStruct(1, function(err, message){
+    console.log('Check log: ' + message.value);
+
+    //close the connection once we're done
+    connection.end();
+  });
+});
diff --git a/tutorial/nodejs/NodeServer.js b/tutorial/nodejs/NodeServer.js
new file mode 100644
index 0000000..ba36105
--- /dev/null
+++ b/tutorial/nodejs/NodeServer.js
@@ -0,0 +1,85 @@
+/*
+ * 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(result) {
+    console.log("ping()");
+    result(null);
+  },
+
+  add: function(n1, n2, result) {
+    console.log("add(", n1, ",", n2, ")");
+    result(null, n1 + n2);
+  },
+
+  calculate: function(logid, work, result) {
+    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';
+        result(x);
+        return;
+      }
+      val = work.num1 / work.num2;
+    } else {
+      var x = new ttypes.InvalidOperation();
+      x.what = work.op;
+      x.why = 'Invalid operation';
+      result(x);
+      return;
+    }
+
+    var entry = new SharedStruct();
+    entry.key = logid;
+    entry.value = ""+val;
+    data[logid] = entry;
+
+    result(null, val);
+  },
+
+  getStruct: function(key, result) {
+    console.log("getStruct(", key, ")");
+    result(null, data[key]);
+  },
+
+  zip: function() {
+    console.log("zip()");
+    result(null);
+  }
+
+});
+
+server.listen(9090);
