Skip to main content

Posts

Showing posts with the label node js advantages and disadvantages

Node.js and NPM Examples

The Test examples, //Test NodeJs example var http = require( 'http' ); http.createServer( function (req, res) { res.writeHead( 200 , { 'Content-Type' : 'text/plain' }); res.end( 'Hello NodeJs, I am Anil \n ' ); }).listen( 1337 , "127.0.0.1" ); References,                     i.             https://egghead.io/lessons/node-js-installing-node-js-and-npm-on-windows                   ii.             https://blog.risingstack.com/node-js-windows-10-tutorial/                 iii.             https://howtonode.org/how-to-install-nodejs    ...

Installing Node.js on Windows, Mac and Linux

How to setup a Node.js development environment on Windows, Mac and Linux? It is easy to install Node.js on Mac , Windows and Linux . Simply you can go to Node.js official site and download you installer (Mac, Windows and Linux), and then execute the installer as per you and after that your window installer you received a text messages looks like,  “Congrats!! You successfully installed Node.js on Windows!!” Node.js Installer Following Steps, 1.       Download the Windows installer from Nodejs.org official site. 2.       Click and Run the installer (.msi installer package). 3.        Follow the prompts instructions of the installer (Accept the agreement and click the NEXT button). 4.        Restart your computer to get everything working in your command line interface (CLI). Download Installer , Download Node.js built installer and source code as for you, ...

Where to use Node.js?

The ability to handle the thousands of concurrent connections with single process and minimum overhead using the JavaScript developed the server applications and networking applications. Some highlighted Node.js points are, a)       Single Page Applications b)      Streaming Data c)       A Real-time Applications like online games, collaboration tools and chat rooms etc. d)      I/O bound Applications e)       APIs based Applications f)        JSON based Applications g)       PROXY Applications

Features of Node.js

a)        It is an asynchronous and event-driven system. b)        Single-threaded event-driven system c)        It is very   lightweight and fast. d)        Tolling e)        Easy to configure f)         Node never buffering g)        It is highly scalable but single threaded. h)        Safe and secure.

Node.js Advantages and Disadvantages

Advantages:- a)       Single Page Applications b)      Streaming Data c)       A Real-time Applications like online games, collaboration tools and chat rooms etc. d)      I/O bound Applications e)       APIs based Applications f)        JSON based Applications g)       PROXY Applications Disadvantages:- a)       Nested callback hell. b)      In Node.js, any CPU intensive computation will block the responsiveness. c)       Dealing with files can be a bit of a pain. d)      In Node.js, the relational database is a bit of a pain. e)       It's asynchronous programming model not for synchronous model. For more, http://www.code-sample.com/2015/04/what-is-node-s-why-we-use.html ...