Starting with Node.js

node.js
In this post will be show about introduction and starting with Node.js. This post will be help you to understanding from basic Node.js to advance.

 1. What is Node.js?
  • Node.js is JavaScript run-time build on Chrome's V8 JavaScript Engin.
  • Node.js is use event-driven, non-blocking/IO model that make it lightweight and efficient and cross-platform run time environment.
  • Node.js was developed by Ryan Dahl in 2009.
2. Advantage of Node.js?
  • Open-source framework under MIT license (MIT license is a free software license originating at the Massachusette Institute of Technology.
  • Use JavaScript to build entire server side application.
  • Lightweight framework that include bare minimum module. Other module can be include as per the need of an application.
  • Synchronize by default So It perform faster that other framework.
  • cross-platform framework that can run on Window, Mac and Linux.
3. Installing Node.js on Window
  1. Download Node.js from website https://nodejs.org/en 
  2. After download is finis please double-click on it to starting installation.
  3. After complete installation please find Node.js command prompt and open it to verify node.js installation as bellow:
  $ node --version
4. Starting with First Code
To starting write code with Node.js please follow as bellow:
1. Create folder project (ex: nodeproject)
2. Create file javascript that put name main.js and write code as bellow
 
   /* Hello, World! program in node.js */
   console.log("Hello, World!")

3. Open Node.js command prompt and browse to folder project and then type command as bellow
  $ node main.js


Share this

Related Posts

Previous
Next Post »