Node.js is one of the most popular JavaScript Framework, is a server-side platform developed by Ryan Dahl in 2009 and built on Google Chrome’s JavaScript Engine (V8 Engine). Node.js provides the cross-platform runtime environment , driven on events and executes asynchronous transactions helps in building I/O intensive web applications, single-page applications, server based and network applications with ease. Node.js is open source, completely free, and used by thousands of developers around the world.
Node.js tutorial covers topics on Node.js installation on windows and linux, REPL module in Node.js, NPM module in Node.js, Node.js callbacks examples , Node.js event loop examples, Node.js OS module examples , Node.js Path module examples , Node.js query string examples, Node.js URL examples , cryptography in Node.js, Node.js debugger examples , DNS module in Node.js , Node.js Net module example, Node.js UDP example, process example in Node.js , child processes in Node.js, buffer module example in Node.js, streams example in Node.js, file system module in Node.js, global objects in Node.js, NodeJS web modules , module level object scope in Node.js
Node.js tutorial provides the basic and advanced concepts of Node.js.Knowledge of HTML /CSS/ AJAX should be useful.
Lets consider a simple server based processing scenario and where node.js executes client request in asynchronous fashion and eliminates the waiting time to be ready for processing next request.
PHP / ASP/ Java based server processing | Node.JS server processing |
Client submit the data request for processing | Client submit the data request for processing |
Client waits till the request is getting processed | No wait is required at client side |
Server processes the request and sends it back to the Client | Client is ready to process next request |
Client is ready to process next request | When Server processes the request and sends it back to the Client |
which conlcudes that Node.js runs single-threaded, non-blocking asynchronously programming and provides better memory efficiency.
What node.js provides to the developers ?
The below given are the features which makes it more popular among developers
- Node.js helps in developing dynamic page content
- Node.js provides numerous file based operations (create, open, read, write, delete, and close files on the server)
- Node.js helps in collecting form data
- Node.js provides feature for CRUD operations (Create, Read, Update ,Delete on the database
Node.js Download
The node.js can be downloaded from the Node.js official web site https://nodejs.org
Node.js sample file run
Once the successful installation, try to validate the node.js by executing the below sample program.
var http = require('http'); var requestListener = function (req, res) { res.writeHead(200); res.end('Hello, World!'); } var server = http.createServer(requestListener); server.listen(3000, function() { console.log("Listening on port 3000")});
Node.js Tutorial Topics
The below given are the common topics for beginners to learn Node.js.