Node JS uses V8 engine.Node JS is an asynchronous language.It is lightweight and efficient because of it's event-driven ,non-blocking I/O nature.Normally uses for
- I/O bound appications.
- Data treaming applications.
- Data intensive real-time applications.
- JSON API based applications.
- Single page applications.
Not the best platform for CPU intensive heavy computational applications.It is capable of handling a huge number of simultaneous connections with high throughput.Node js is single threaded. It not create new thread for each connection.
Advantages of Node JS
- easy to scale both horizontal and vertical
- high performances - because V8 engine compile the JS code into machine code directly.it caching modules into memory after the first use.
- easily extensible
- has many reusable modules - npm package manager has large no of modules.
- support for common tool like unit testing.
disadvantages
- has many libraries but no of robust libraries are comparatively low.
- not suitable for computational intensive tasks.
How to install Node JS
- go to node js web site and download node js windows installer.
- run the installer and install node JS.
- restart....
- open cmd window and type node -v or node --version to assure that node js is installed.if installed it shows the version of node JS that you installed.(v6.10.0 or something like that..).
- open cmd window and type npm -v to assure node package manager(npm) is installed.if successfully installed it shows the version of npm that you installed.(3.10.10 or something like that..).
- to test open notepad or any text editor and type conosle.log('node JS is installed')and save as <any name>.js(asd.js)
- now open cmd and go to the directory that you saved .js file and type node <name_of_file>.js.now you can see "node JS is installed" text in cmd.
- that means you have successfully installed node js....
No comments:
Post a Comment