asdfaposekfroüawpoef kapwefawefawefaw fa<sdsa sf deawe fawe fasdf awe faw ef awef qw ef qw ef qw
{{lead too short|date=October 2012}}
{{infobox software
| name = Node.js
| logo = [[File:Nodejs_logo_light.png|150px|Node.js Logo]]
| screenshot =
| caption =
| author = Ryan Lienhart Dahl
| developer = [http://github.com/ry/node/blob/master/AUTHORS Node.js Developers], [[Joyent]]
| operating system = [[Mac OS X]], [[Linux]], [[Solaris (operating system)|Solaris]], [[FreeBSD]], [[OpenBSD]], [[Windows]] (older versions require [[Cygwin]]), [[webOS]]
| status = Active
| released =
| latest release version = 0.8.14
| latest release date = {{release date|2012|10|25}}
| latest preview version = 0.9.3
| latest preview date = {{release date|2012|10|24}}
| programming language = [[C++]], [[JavaScript]]
| genre = [[Event-driven programming|Event-driven]] [[computer network programming|networking]]
| license = [[MIT License]]
| website = {{URL|http://nodejs.org/}}
}}
'''Node.js''' is a server side [[software system]] designed for writing [[scalability|scalable]] Internet applications, notably [[web server]]s.<ref>[http://www.readwriteweb.com/hack/2011/01/wait-whats-nodejs-good-for-aga.php Wait, What's Node.js Good for Again?], By Klint Finley, January 25, 2011, ReadWriteHack</ref>
Programs are written on the server side in [[JavaScript]], using [[Event-driven architecture|event-driven]], [[asynchronous I/O]] to minimize [[Overhead (computing)|overhead]] and maximize [[scalability]].<ref>{{cite news
|url=http://www.theregister.co.uk/2011/03/01/the_rise_and_rise_of_node_dot_js/
|title=The Node Ahead: JavaScript leaps from browser into future
|author=Cade Metz |publisher=''[[The Register]]'' |date=1st March 2011
}}</ref>
== Details ==
Node.js consists of Google's [[V8 (JavaScript engine)|V8 JavaScript engine]], [http://github.com/joyent/libuv libUV], and several built-in [[Library (computing)|libraries]].
Node.js was created by Ryan Dahl starting in 2009, and its growth is sponsored by [[Joyent]], his employer.<ref>[http://mashable.com/2011/03/10/node-js/ Why Everyone Is Talking About Node], By Jolie O'Dell, March 10, 2011, Mashable
</ref><ref name="Node.js pushes JavaScript to the server-side">{{Cite web
|url= http://www.sdtimes.com/NODE_JS_PUSHES_JAVASCRIPT_TO_THE_SERVER_SIDE/By_Alex_Handy/About_JAVASCRIPT_and_NODEJS/35668
|title= Node.js pushes JavaScript to the server-side
|author= Alex Handy
|publisher= SDTimes
|date= 2011-06-24
|accessdate= 2011-09-04}}
</ref>
Dahl's original goal was to create the ability to make web sites with [[Push_technology|push capabilities]] as seen in web applications like [[Gmail]]. After trying solutions in several other programming languages he chose JavaScript because of the lack of an existing I/O API. This allowed him to define a convention of [[non-blocking I/O|non-blocking]], event-driven I/O.<ref name="nodeupandrunning">{{cite book|last1=Hughes-Croucher|first1=Tom|last2=Wilson|first2=Mike|title=Up and Running with Node.js|edition=1st|series=Up and Running|year=2012|publisher=O'Reilly|___location=Sebastopol|isbn=978-1-4493-9858-3|page=vii|quote=I was concerned about the ability to program advanced push features into the website like I had seen in Gmail}}<br>See the book's Foreword [http://ofps.oreilly.com/titles/9781449398583/forward.html at OReilly.com]</ref>
Similar environments written in other programming languages include [[Twisted (software)|Twisted]] for [[Python (programming language)|Python]], [[Perl Object Environment]] for [[Perl]], [[libevent]] for [[C (programming language)|C]] and [[EventMachine]] for [[Ruby (programming language)|Ruby]]. Unlike most JavaScript programs, it is not executed in a web browser, but is instead a [[server-side JavaScript]] application. Node.js implements some [[CommonJS]] specifications.<ref>[http://wiki.commonjs.org/wiki/Implementations/node.js Implementations/node.js] - CommonJS Spec Wiki</ref> It provides a [[read–eval–print loop|REPL]] environment for interactive testing.
== Examples ==
This is a complete implementation of [[Hello world program|hello world]] as an [[Web server|HTTP Server]] in Node.js:
<source lang="javascript">
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
}).listen(8000);
console.log('Server running at http://localhost:8000/');
</source>
The following code is a simple [[Transmission Control Protocol|TCP]] server which listens on [[TCP and UDP port|port]] 7000 and [[echo (command)|echo]]es 'hello' upon connection:
<source lang="javascript">
var net = require('net');
net.createServer(function (stream) {
stream.write('hello\r\n');
stream.on('end', function () {
stream.end('goodbye\r\n');
});
stream.pipe(stream);
}).listen(7000);
</source>
== Community ==
Node.js has a developer community primarily centered around two mailing lists, [http://groups.google.com/group/nodejs nodejs] and [http://groups.google.com/group/nodejs-dev nodejs-dev], and the [[IRC]] channel #node.js on [[freenode]]. The community gathers at [http://www.nodeconf.com/ NodeConf], an annual developer conference focused on Node.js.<ref>[http://www.readwriteweb.com/hack/2011/04/nodeconf-schedule-announced.php NodeConf Schedule Announced], By Klint Finley, April 7, 2011, ReadWriteHack</ref>
Node.js is currently used by a number of large companies including [[Linkedin]]<ref name="vbliipad">{{cite web | url=http://venturebeat.com/2012/05/02/linkedin-ipad-app-engineering/ | title=You’ll never believe how LinkedIn built its new iPad app | publisher=VentureBeat | date=May 2, 2012 | accessdate=May 10, 2012}}</ref><ref>[http://engineering.linkedin.com/nodejs/blazing-fast-nodejs-10-performance-tips-linkedin-mobile], LinkedIn's developer blog discusses their Node.js stack optimizations</ref>, [[Microsoft]]<ref name="guardianMS">{{cite web | url=http://www.guardian.co.uk/technology/blog/2011/nov/09/programming-microsoft | title=Here's why you should be happy that Microsoft is embracing Node.js | publisher=The Guardian | date=November 9, 2011 | accessdate=May 10, 2012}}</ref>, [[Yahoo!]]<ref>[http://developer.yahoo.com/blogs/ydn/posts/2011/11/yahoo-announces-cocktails-%E2%80%93-shaken-not-stirred/], Yahoo! Developer Network announces Cocktails project using Node.js</ref> and [[Walmart]]<ref name="vbwalmart">{{cite web | url=http://venturebeat.com/2012/01/24/why-walmart-is-using-node-js/ | title=Why Walmart is using Node.js | publisher=VentureBeat | date=January 24, 2012 | accessdate=May 10, 2012}}</ref>.
== See also ==
{{Portal|Free software}}
* [[npm (software)|npm]] - the predominant package manager for Node.js. As of Node.js version 0.6.3, npm is installed automatically with Node.js.
* [[JSAN]], the JavaScript Archive Network - a lesser used JavaScript package manager.
== References ==
{{Reflist|2}}
==Further reading==
{{Refbegin}}
*{{citation
| first1 = Tom
| last1 = Hughes-Croucher
| first2 = Mike
| last2 = Wilson
| date = April, 2012
| title = Up and Running with Node.js
| edition = First
| publisher = [[O'Reilly Media]]
| page = 204
| isbn = 978-1-4493-9858-3
| url = http://shop.oreilly.com/product/0636920015956.do
}}
*{{citation
| first1 = George
| last1 = Ornbo
| date = September, 2012
| title = Sams Teach Yourself Node.js in 24 Hours
| edition = First
| publisher = [[SAMS Publishing]]
| page = 440
| isbn = 978-0-672-33595-2
| url = http://informit.com/title/9780672335952
}}
{{refend}}
== External links ==
*{{Official website|http://nodejs.org}}
*[http://npmjs.org/ npm]
[[Category:JavaScript libraries]]
[[Category:Free software programmed in JavaScript]]
[[Category:Free software programmed in C++]]
[[ar:Node.js]]
[[be:Node.js]]
[[ca:Node.js]]
[[cs:Node.js]]
[[de:Node.js]]
[[es:Node.js]]
[[fa:نود.جیاس]]
[[fr:Node.js]]
[[ko:Node.js]]
[[it:Node.js]]
[[he:Node.js]]
[[hu:Node.js]]
[[ja:Node.js]]
[[pl:Node.js]]
[[pt:Node.js]]
[[ru:Node.js]]
[[uk:Node.js]]
[[vi:Node.js]]
[[zh:Node.js]]
|