Commits

Brent Tubbs committed 589b9d2

add sleep proc

  • Participants
  • Parent commits b1e7561
  • Tags v4

Comments (0)

Files changed (3)

 web: node web.js
+count: node count.js
+var sleep = require('sleep');
+
+var count = 0;
+// print a counter to stdout once per second.
+while (1) {
+  console.log(count);
+  count++;
+  sleep.sleep(1);
+}

File package.json

   "name": "node-example",
   "version": "0.0.1",
   "dependencies": {
-    "express": "2.5.x"
+    "express": "2.5.x",
+    "sleep": "*"
   },
   "engines": {
     "node": "0.8.x",