This repository has been archived by the owner on Mar 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathindex.html
175 lines (156 loc) · 7.37 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="image/x-icon" rel="icon" href="favicon.ico">
<link type="image/x-icon" rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="/pipe.css">
<link rel="stylesheet" href="/sh_vim-dark.css">
<link rel="stylesheet" href="/lfcollab.css">
<script type="text/javascript" src="//use.typekit.net/mse5tqx.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<link rel="alternate"
type="application/rss+xml"
title="node blog"
href="http://feeds.feedburner.com/nodejs/123123123">
<title>Node.js</title>
</head>
<body id="front">
<div id="lfcollabprojects-header">
<div class="gray-diagonal">
<div class="header-inner">
<a id="lfcollabprojects-logo" href="http://collabprojects.linuxfoundation.org">Linux Foundation Collaborative Projects</a>
</div>
</div>
</div>
<div id="nav">
<img id="logo" src="/images/logo.svg" alt="node.js">
<ul>
<li class="active"><a href="/">Home</a></li>
<li><a href="/download"/>Downloads</a></li>
<li><a href="/documentation/">Docs</a></li>
<li><a href="/contribute/">Contribute</a></li>
<li><a href="/foundation/">Foundation</a></li>
<li><a href="/community/">Community</a></li>
<li><a href="/about/">About</a></li>
<li><a href="http://jobs.nodejs.org">Jobs</a></li>
<li><a href="http://blog.nodejs.org">Blog</a></li>
</ul>
</div>
<div id="intro">
<p>Node.js® is a platform built on <a
href="http://code.google.com/p/v8/">Chrome's JavaScript runtime</a>
for easily building fast, scalable network applications. Node.js
uses an event-driven, non-blocking I/O model that makes it
lightweight and efficient, perfect for data-intensive real-time
applications that run across distributed devices.</p>
<p class="version">Current Version: __VERSION__</p>
<div class=buttons>
<a href="http://nodejs.org/dist/__VERSION__/node-__VERSION__.tar.gz" class="button downloadbutton" id="downloadbutton">INSTALL</a>
<a href="download/" class=button id="all-dl-options">Downloads</a
><a href="api/" class="button" id="docsbutton">API Docs</a>
</div>
</div>
<div id="promo">
<a href="http://www.joyent.com/noderoad"><img src="images/roadshow-promo.png"></a>
</div>
<div id="content-wrap">
<div id="content" class="clearfix">
<div id="column1">
<h2>An example: Webserver</h2>
<p>This simple web server written in Node responds with "Hello World" for every request.</p>
<pre>
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');</pre>
<p>To run the server, put the code into a file
<code>example.js</code> and execute it with the
<code>node</code> program from the command line:</p>
<pre class="sh_none">
% node example.js
Server running at http://127.0.0.1:1337/</pre>
<p>Here is an example of a simple TCP server which listens on port 1337 and echoes whatever you send it:</p>
<pre>
var net = require('net');
var server = net.createServer(function (socket) {
socket.write('Echo server\r\n');
socket.pipe(socket);
});
server.listen(1337, '127.0.0.1');</pre>
</div>
<div id="column2" class="featured">
<h2>Featured</h2>
<a href="/video/"><img src="/images/walmart-thumb.jpg" width="263"></a>
<h3>Node.js at Walmart</h3>
<p><a href="http://twitter.com/eranhammer">Eran Hammer</a>, Principal Architect at Walmart, talks about how they use Node.js as a way to reinvent legacy APIs to create modern front end experiences.</p>
</div>
</div>
</div>
<div id="footer">
<div class="foot-1">
<div class="foot-nav">
<ul>
<li><a href="http://nodejs.org/download/">Downloads</a></li>
</ul>
<ul>
<li><a href="http://nodejs.org/documentation/">Documentation</a></li>
<li><a href="http://nodejs.org/api/">API Docs</a></li>
<li><a href="http://nodejs.org/documentation/tutorials/">Tutorials</a></li>
<li><a href="http://nodejs.org/documentation/localization/">Localization</a></li>
</ul>
<ul>
<li><a href="http://nodejs.org/contribute/">Contribute</a></li>
<li><a href="http://nodejs.org/contribute/code_contributions/">Code contributions</a></li>
<li><a href="http://nodejs.org/contribute/accepting_contributions.html">Accepting contributions</a></li>
<li><a href="http://nodejs.org/contribute/becoming_collaborator.html">Becoming a collaborator</a></li>
</ul>
<ul>
<li><a href="http://nodejs.org/foundation/">Foundation</a></li>
<li><a href="http://nodejs.org/foundation/members.html">Members</a></li>
<li><a href="http://nodejs.org/foundation/blog.html">Blog</a></li>
</ul>
<ul>
<li><a href="http://nodejs.org/community/">Community</a></li>
<li><a href="https://github.com/joyent/node/issues">Github Issues</a></li>
<li><a href="http://groups.google.com/group/nodejs">Mailing List</a></li>
<li><a href="http://webchat.freenode.net/?channels=node.js">IRC</a></li>
<li><a href="https://twitter.com/nodejs">Twitter</a></li>
</ul>
<ul>
<li><a href="http://nodejs.org/about/">About</a></li>
<li><a href="http://nodejs.org/about/organization/">Organization</a></li>
<li><a href="http://nodejs.org/about/releases/">Releases</a></li>
<li><a href="http://nodejs.org/about/resources/">Resources</a></li>
</ul>
<ul>
<li><a href="http://blog.nodejs.org">Blog</a></li>
</ul>
</div>
</div>
</div>
<div id="lfcollabprojects-footer">
<div class="gray-diagonal">
<div class="footer-inner">
<p>© 2015 Node.js Foundation. All Rights Reserved. Portions of
this site originally © 2015 Joyent. </p>
<p>Linux Foundation is a registered trademark of The Linux
Foundation.</p>
<p>Node.js is a trademark of Joyent, Inc. and is used with its permission. Please review the Trademark Guidelines of the Node.js Foundation <a href="/images/trademark-policy.pdf">here</a>.</p>
<p>Linux is a registered <a href="http://www.linuxfoundation.org/programs/legal/trademark" title="Linux Mark Institute">trademark</a> of Linus Torvalds.</p>
<p>
<a href="https://raw.github.com/joyent/node/master/LICENSE">Node.js Project Licensing Information</a>.
</p>
</div>
</div>
</div>
<script src="sh_main.js"></script>
<script src="sh_javascript.min.js"></script>
<script>if (window.highlight) { highlight(undefined, undefined, 'pre'); }</script>
<script src="tracking.js"></script>
<script src="main.js"></script>
</body>
</html>