2009-06-05 12:23:51 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< style type = "text/css" >
ul {
padding: 0;
margin: 0;
}
2009-08-26 22:03:19 +02:00
< / style >
2011-12-12 07:25:42 +01:00
< script type = 'text/javascript' src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js?ver=3.1.3' > < / script >
2009-06-05 12:23:51 +02:00
< script type = "text/javascript" src = "sh_main.js" > < / script >
< script type = "text/javascript" src = "sh_javascript.min.js" > < / script >
2011-03-16 08:44:05 +01:00
< link type = "image/x-icon" rel = "icon" href = "favicon.ico" / >
< link type = "image/x-icon" rel = "shortcut icon" href = "favicon.ico" / >
2009-08-25 16:23:01 +02:00
< link type = "text/css" rel = "stylesheet" href = "pipe.css" / >
2009-06-05 12:23:51 +02:00
< link type = "text/css" rel = "stylesheet" href = "sh_vim-dark.css" / >
2011-03-17 21:32:27 +01:00
< link rel = "alternate"
type="application/rss+xml"
2011-03-18 23:49:26 +01:00
title="node blog"
href="http://feeds.feedburner.com/nodejs/123123123"/>
2009-06-05 12:23:51 +02:00
< meta http-equiv = "content-type" content = "text/html; charset=utf-8" / >
< title > node.js< / title >
2011-12-12 07:25:42 +01:00
< script >
$(document).ready(function() {
$('#close').hide();
$('#downloadbutton').click(function() {
$('#download').show();
return false;
});
$('body').click(function() {
$('#download').hide();
});
2011-12-12 18:19:30 +01:00
$('#installers li a').click(function() {
window.location = $(this).attr('href');
return false;
});
2011-12-12 07:25:42 +01:00
});
< / script >
2009-06-05 12:23:51 +02:00
< / head >
2010-11-18 02:51:07 +01:00
< body >
2011-12-12 07:25:42 +01:00
< div id = "intro" >
< img id = "logo" src = "logo.png" alt = "node.js" / >
2009-06-05 12:23:51 +02:00
2011-12-12 07:25:42 +01:00
< 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 >
2009-06-05 12:23:51 +02:00
2011-12-12 07:25:42 +01:00
< a href = "#download" id = "downloadbutton" > Download< / a >
< / div >
< div id = "quotes" class = "clearfix" >
< h2 > Node.js in the Industry< / h2 >
< ul >
< li class = "microsoft" > < img src = "microsoft-logo.png" / >
< p > Node gives Azure users the first end-to-end JavaScript
experience for the development of a whole new class of real-time
applications.
< br / >
< a href = "http://blogs.msdn.com/b/interoperability/" > Claudio Caldato< / a >
< br / >
< span > Principal Program Manager, Interoperability Strategy< / span > < / p > < / li >
< li class = "ebay" > < img src = "ebay-logo.png" / >
< p > Node’ s evented I/O model freed us from worrying about locking
and concurrency issues that are common with multithreaded async
I/O.
< br / >
< a href = "http://www.ebaytechblog.com/2011/11/30/announcing-ql-io/" > Subbu Allamarju< / a >
< br / >
< span > Principal Member, Technical Staff< / span > < / p > < / li >
< li class = "linkedin" > < img src = "linkedin-logo.png" / >
< p > On the server side, our entire mobile software stack is
completely built in Node. One reason was scale. The second is
Node showed us huge performance gains.
< br / >
< a href = "http://venturebeat.com/2011/08/16/linkedin-node/" > Kiran Prasad< / a >
< br / >
< span > Director of Engineering, Mobile< / span > < / p > < / li >
< li class = "yahoo" > < img src = "yahoo-logo.png" / >
< p > Node.js is the execution core of Manhattan. Allowing
developers to build one code base using one language – that is
the nirvana for developers.
< br / >
< a href = "http://developer.yahoo.com/blogs/ydn/posts/2011/11/yahoo-announces-cocktails-%E2%80%93-shaken-not-stirred/" > Renaud Waldura< / a >
< br / >
< span > Sr. Product Manger, Cocktail< / span > < / p > < / li >
< / ul >
< / div >
< 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 >
2010-06-24 02:40:51 +02:00
var http = require('http');
2009-10-09 14:18:10 +02:00
http.createServer(function (req, res) {
2010-06-11 08:19:43 +02:00
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
2011-04-23 01:01:34 +02:00
}).listen(1337, "127.0.0.1");
2011-12-12 07:25:42 +01:00
console.log('Server running at http://127.0.0.1:1337/');< / pre >
2009-08-26 22:03:19 +02:00
2011-12-12 07:25:42 +01:00
< p > To run the server, put the code into a file < code > example.js< / code > and execute it with the < code > node< / code > program:< / p >
< pre class = "sh_none" >
2009-10-16 13:46:16 +02:00
% node example.js
2011-04-23 01:01:34 +02:00
Server running at http://127.0.0.1:1337/< / pre >
2009-08-26 22:03:19 +02:00
2011-12-12 07:25:42 +01:00
< p > Here is an example of a simple TCP server which listens on port 1337 and echoes whatever you send it:< / p >
2009-10-16 13:46:16 +02:00
2011-12-12 07:25:42 +01:00
< pre >
2010-06-09 08:25:55 +02:00
var net = require('net');
2011-02-23 21:56:50 +01:00
var server = net.createServer(function (socket) {
2010-07-03 10:54:35 +02:00
socket.write("Echo server\r\n");
2011-02-23 21:56:50 +01:00
socket.pipe(socket);
2011-04-23 01:01:34 +02:00
});
2011-02-23 21:56:50 +01:00
2011-12-12 07:25:42 +01:00
server.listen(1337, "127.0.0.1");< / pre >
<!-- <p>Ready to dig in? <a href="">Download the latest version</a> of node.js or learn how other organizations are <a href="">using the technology</a>.</p> -->
< / div >
< div id = "column2" >
< h2 > Featured< / h2 >
< a href = "http://www.youtube.com/watch?v=jo_B4LTHi3I" > < img src = "ryan-speaker.jpg" / > < / a >
A guided introduction to Node
< h2 > Explore Node.js< / h2 >
< ul id = "explore" >
< li > < a href = "http://blog.nodejs.org" class = "explore" > Node.js Blog< / a > < br / > < span > Insight, perspective and events< / span > < / li >
< li > < a href = "about/" class = "explore" > About< / a > < br / > < span > Technical overview< / span > < / li >
< li > < a href = "community/" class = "explore" > Community< / a > < br / > < span > Mailing lists, blogs, and more< / span > < / li >
< li > < a href = "http://nodejs.org/docs/latest/api/index.html" class = "explore" > Documentation< / a > < br / > < span > API Specifications< / span > < / li >
< li > < a href = "http://search.npmjs.org/" class = "explore" > npm Registry< / a > < br / > < span > Modules, resources and more< / span > < / li >
< li > < a href = "logos/" class = "explore" > Logos< / a > < br / > < span > Logo and desktop background< / span > < / li >
< li > < a href = "http://jobs.nodejs.org/" class = "explore" > Jobs< / a > < br / > < ol class = "jobs" > <!-- JOBS --> <!-- JOBS --> < / ol > < / li >
< / ul >
2009-06-05 12:23:51 +02:00
< / div >
2011-12-12 07:25:42 +01:00
< / div >
< div id = "footer" >
< p > Copyright < a href = "http://joyent.com" > Joyent, Inc< / a > , Node.js
is a < a href = "trademark-policy.pdf" > trademark of Joyent, Inc< / a > .
2010-12-01 08:00:32 +01:00
< / div >
2011-12-12 07:25:42 +01:00
< div id = "download" >
< a href = "/" id = "close" > < / a >
< img id = "download-logo" src = "download-logo.png" alt = "node.js" / >
< ul id = "installers" class = "clearfix" >
< li > < a href = "http://nodejs.org/dist/v0.6.5/node-v0.6.5.msi" > Windows Installer< / a > < br / > node-v0.6.5.msi< / li >
< li > < a href = "http://nodejs.org/dist/v0.6.5/node-v0.6.5.pkg" > Macintosh Installer< / a > < br / > node-v0.6.5.pkg< / li >
< li id = "source" > < a href = "http://nodejs.org/dist/v0.6.5/node-v0.6.5.tar.gz" > Source Code< / a > < br / > node-v0.6.5.tar.gz< / li >
< / ul >
< ul id = "documentation" >
< li > < a href = "http://nodejs.org/docs/v0.6.5/api/index.html" > Documentation< / a > < / li >
< li > < a href = "http://nodejs.org/dist/v0.6.5" > Other release files< / a > < / li >
< li > < a href = "https://raw.github.com/joyent/node/v0.6.5/LICENSE" > License< / a > < / li >
< li > < a href = "https://github.com/joyent/node" > Git Repository< / a > < / li >
< / ul >
2010-11-10 00:43:52 +01:00
< / div >
2011-12-12 07:25:42 +01:00
2009-10-16 13:46:16 +02:00
< script type = "text/javascript" >
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
2009-11-04 00:18:05 +01:00
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
2009-10-16 13:46:16 +02:00
< / script >
< script type = "text/javascript" >
try {
var pageTracker = _gat._getTracker("UA-10874194-2");
pageTracker._trackPageview();
} catch(err) {}< / script >
2010-11-18 02:51:07 +01:00
< script type = "text/javascript" > highlight ( undefined , undefined , 'pre' ) ; < / script >
2009-06-05 12:23:51 +02:00
< / body >
2009-05-13 17:46:00 +02:00
< / html >