- Node.js
-
Node.js Original author(s) Ryan Lienhart Dahl Developer(s) Node.js Developers Stable release 0.6.2 / November 18, 2011 Preview release 0.5.10 / October 21, 2011 Development status Active 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.org Node.js is an event-driven I/O server-side JavaScript environment based on V8. It is intended for writing scalable network programs such as web servers.[1] It was created by Ryan Dahl in 2009, and its growth is sponsored by Joyent, which employs Dahl.[2] [3]
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, it is not executed in a web browser, but is instead a form of server-side JavaScript. Node.js implements some CommonJS specifications.[4] Node.js includes a REPL environment for interactive testing.
Contents
Examples
HTTP Server version of hello world 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://127.0.0.1:8000/');
Another example with 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
There is a very active Node.js 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.[5]
See also
- JavaScript
- V8 (JavaScript engine)
- NPM, the Node Package Manager - the predominant package manager for 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
- ^ 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. http://www.sdtimes.com/NODE_JS_PUSHES_JAVASCRIPT_TO_THE_SERVER_SIDE/By_Alex_Handy/About_JAVASCRIPT_and_NODEJS/35668. Retrieved 2011-09-04.
- ^ Implementations/node.js - CommonJS Spec Wiki
- ^ NodeConf Schedule Announced, By Klint Finley, April 7, 2011, ReadWriteHack
External links
- 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
Categories:- Programming language topic stubs
- JavaScript libraries
Wikimedia Foundation. 2010.