Skip to content
Browse files

First simple examples

  • Loading branch information...
0 parents commit 2e1f355b23cbc9de0b9430f446263a0be9eded79 @ajlopez committed Dec 18, 2011
Showing with 19 additions and 0 deletions.
  1. +3 −0 Simple/hello.js
  2. +7 −0 Simple/helloasync.js
  3. +9 −0 Simple/http.js
3 Simple/hello.js
@@ -0,0 +1,3 @@
+
+console.log("Hello, World");
+
7 Simple/helloasync.js
@@ -0,0 +1,7 @@
+
+setTimeout(function() {
+ console.log("World");
+}, 2000);
+
+console.log("Hello ");
+
9 Simple/http.js
@@ -0,0 +1,9 @@
+
+var http = require('http');
+
+http.createServer(function (req, res) {
+ res.writeHeader(200, {'Content-type': 'text/plain'});
+ res.write('Hello ');
+ res.end('World');
+}).listen(8000);
+

0 comments on commit 2e1f355

Please sign in to comment.
Something went wrong with that request. Please try again.