Node.js
Node.js Logo | |
Original author(s) | Ryan Lienhart Dahl |
---|---|
Developer(s) | Node.js Developers |
Stable release | 0.6.9
/ January 27, 2012 |
Preview release | 0.7.1
/ January 23, 2012 |
Repository | |
Written in | C++, JavaScript |
Operating system | Mac OS X, Linux, Solaris, FreeBSD, OpenBSD, Windows (older versions require Cygwin), webOS |
Type | Event-driven networking |
License | MIT License |
Website | nodejs |
Node.js is a software system designed for writing scalable internet applications, notably web servers.[1] Programs are written in JavaScript, using event-driven, asynchronous I/O to minimize overhead and maximize scalability.[2] Node.js consists of Google's V8 JavaScript engine plus several built-in libraries.
Node.js was created by Ryan Dahl starting in 2009, and its growth is sponsored by Joyent, his employer.[3][4]
Similar environments written in other programming languages include Twisted for Python, Perl Object Environment for Perl, libevent for C and EventMachine for 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.[5] It provides a REPL environment for interactive testing.
Node.js was selected by InfoWorld for the Technology of the Year Award in 2012.[6]
Examples
This is a complete implementation of hello world as an HTTP Server in Node.js:
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/');
This is a simple TCP server which listens on port 7000 and echoes 'hello' upon connection:
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);
Community
Node.js has a developer community primarily centered on two mailing lists, nodejs and nodejs-dev, and the IRC channel #node.js on freenode. The community gathers at NodeConf, an annual developer conference focused on Node.js.[7]
See also
- JavaScript
- V8 (JavaScript engine)
- NPM, the Node Package Manager - 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
- ^ Wait, What's Node.js Good for Again?, By Klint Finley, January 25, 2011, ReadWriteHack
- ^ Cade Metz (1st March 2011). "The Node Ahead: JavaScript leaps from browser into future". The Register.
{{cite news}}
: Check date values in:|date=
(help); Italic or bold markup not allowed in:|publisher=
(help) - ^ Why Everyone Is Talking About Node, By Jolie O'Dell, March 10, 2011, Mashable
- ^ Alex Handy (2011-06-24). "Node.js pushes JavaScript to the server-side". SDTimes. Retrieved 2011-09-04.
- ^ Implementations/node.js - CommonJS Spec Wiki
- ^ "Node.js Selected by InfoWorld for 2012 Technology of the Year Award". MarketWatch. January 11, 2012. Retrieved January 26, 2012.
- ^ NodeConf Schedule Announced, By Klint Finley, April 7, 2011, ReadWriteHack
External links
This article's use of external links may not follow Wikipedia's policies or guidelines. (November 2011) |
- Official website
- Source Repository
- Nodejs mailing list - general discussion about Node.js
- Nodejs-dev mailing list - list for discussion of bugs and changes to Node.js itself
- The Node.js Package Manager
- How To Node tutorial web site
- How to write your own native Node.js extension
- Node.js contributor Felix Geisendörfer gives some background on Node.js on The Changelog podcast
- A thorough introduction on the PavingWays blog
- Introduction to Node.js
- Node.js and the JavaScript Age
- The Node Beginner Book, a comprehensive introduction for experienced developers that are new to Node.js
- Mixu's Node Book, a free 10-chapter book on Node.js
- A Beginner's Tutorial for Node.js, an in-depth tutorial for developers new to Node.