Skip to content
This repository
Browse code

Fix article on installing node.

  • Loading branch information...
commit b9fa2fc389ee00f482455a46d0b9c4c775f89ca2 1 parent 4ed0d79
Tim Caswell authored September 16, 2010
28  articles/how-to-install-nodejs.markdown
Source Rendered
@@ -13,7 +13,7 @@ and [Windows][].
13 13
 
14 14
 ## Mac
15 15
 
16  
-If youre using the excellent [homebrew][] package manager, you can
  16
+If you're using the excellent [homebrew][] package manager, you can
17 17
 install node with one command: `brew install node`.
18 18
 
19 19
 Otherwise, follow the below steps:
@@ -22,6 +22,8 @@ Otherwise, follow the below steps:
22 22
 2.  [Install git][].
23 23
 3.  Run the following commands:
24 24
 
  25
+<how-to-install-nodejs/darwin_setup.sh>
  26
+
25 27
 You can check it worked with a simple [Hello, World!][] example.
26 28
 
27 29
 ## Ubuntu
@@ -32,6 +34,8 @@ You can check it worked with a simple [Hello, World!][] example.
32 34
 
33 35
 2.  Run the following commands:
34 36
 
  37
+<how-to-install-nodejs/ubuntu_setup.sh>
  38
+
35 39
 You can check it worked with a simple [Hello, World!][] example.
36 40
 
37 41
 Thanks to [code-diesel][] for the Ubuntu dependencies.
@@ -44,32 +48,40 @@ follow these steps:
44 48
 1.  [Install cygwin][].
45 49
 2.  Use `setup.exe` in the cygwin folder to install the following
46 50
     packages:
47  
-    -   devel → openssl
48  
-    -   devel → g++-gcc
49  
-    -   devel → make
50  
-    -   python → python
51  
-    -   devel → git
  51
+    -   devel &rarr; openssl
  52
+    -   devel &rarr; g++-gcc
  53
+    -   devel &rarr; make
  54
+    -   python &rarr; python
  55
+    -   devel &rarr; git
52 56
 
53 57
 3.  Open the cygwin command line with
54 58
     `Start > Cygwin > Cygwin Bash Shell`.
55 59
 4.  Run the below commands to download and build node.
56 60
 
  61
+<how-to-install-nodejs/cygwin_setup.sh>
  62
+
57 63
 For more details, including information on troubleshooting, please
58 64
 see the [GitHub wiki page][].
59 65
 
60 66
 ## Hello Node.js!
61 67
 
62  
-Heres a quick program to make sure everything is up and running
  68
+Here's a quick program to make sure everything is up and running
63 69
 correctly:
64 70
 
  71
+<how-to-install-nodejs/hello_node.js>
  72
+
65 73
 Run the code with the `node` command line utility:
66 74
 
  75
+    > node hello_node.js
  76
+    Server running at http://127.0.0.1:8124/
  77
+
  78
+
67 79
 Now, if you navigate to [http://127.0.0.1:8124/][] in your browser,
68 80
 you should see a nice message.
69 81
 
70 82
 ## Congrats!
71 83
 
72  
-Youve installed [node.js][].
  84
+You've installed [node.js][].
73 85
 
74 86
   [Countdown to Knockout: Post 1 - How to Install Node.js]: http://nodeknockout.posterous.com/countdown-to-knockout-post-1-how-to-install-n
75 87
   [Node.js Knockout]: http://nodeknockout.com/
5  articles/how-to-install-nodejs/cygwin_setup.sh
... ...
@@ -0,0 +1,5 @@
  1
+git clone git://github.com/ry/node.git
  2
+cd node
  3
+./configure
  4
+make
  5
+sudo make install
5  articles/how-to-install-nodejs/darwin_setup.sh
... ...
@@ -0,0 +1,5 @@
  1
+git clone git://github.com/ry/node.git
  2
+cd node
  3
+./configure
  4
+make
  5
+sudo make install
6  articles/how-to-install-nodejs/hello_node.js
... ...
@@ -0,0 +1,6 @@
  1
+var http = require('http');
  2
+http.createServer(function (req, res) {
  3
+  res.writeHead(200, {'Content-Type': 'text/plain'});
  4
+  res.end('Hello Node.js\n');
  5
+}).listen(8124, "127.0.0.1");
  6
+console.log('Server running at http://127.0.0.1:8124/');
5  articles/how-to-install-nodejs/ubuntu_setup.sh
... ...
@@ -0,0 +1,5 @@
  1
+git clone git://github.com/ry/node.git
  2
+cd node
  3
+./configure
  4
+make
  5
+sudo make install

0 notes on commit b9fa2fc

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