Node Fundamentals

Introduction

Node is a runtime environment to execute JavaScript . In Modern Browser every browser have there own engine like chrome have V8, Firefox have Spider,Edge have chakra they compile JavaScript code to machine code.But one of most powerful engine is V8 of chrome by using of that engine and added a C++ wrapper on it in result we have node so by using of node we can execute JavaScript code outside the browser also.It is developed by a smart developer name Ryan Dahl in 2009.

What is Node?
Node is an open source runtime environment to execute JavaScript code.

Node is a Framework?
Not,It is a runtime environment to execute JavaScript code.

Node is cross-platform?
Yes, It is a cross-platform environment to execute JavaScript .

Node is Asynchronous in nature?
Yes, It is Asynchronous in nature with the help of “Event Loop”.

What is an event loop?
Event loop offers node non blocking I/O operations.
For example : 
When you send a request to the server event queue get start and watch until result then send that back as a response. So that it can serve more than one request at a time with the help of event loop.

Is Node is Multi Or Single Thread?
Node works on a single thread with the help of event loop and it offers non blocking I/O operations. 

What is NPM?
NPM stands for Node Package Manager is the largest ecosystem of open source libraries.

How to install node?
Click on the Link : https://nodejs.org/en/download/
It will download the installer then click next as well as similar other application installations.

Is the window object is there in node?
Not,In nodes instead of window object we have global object.

How to create a simple node application?
Step 1: First create a folder name “Application”.
Step 2 :Inside that folder create one file with “simple.js” extension.
Step 3 : Open that js file and write console.log(“My First Node Application”);
Step 4 : Open that folder in CMD for the window or terminal for MAC.
Step 5 : Type node and “simple.js”.

You can see the output “My First Node Application” in the console.

Conclusion

In this Article we had cover what is node ,introduction to node ,event loop and how to create a node Application.

We as an author put lot of effort to write such articles. It motivates us, encourages us and make us write more such things.

Share it with your friends in social media.

Sending
User Review
4.33 (3 votes)

You May Also Like

Avatar

About the Author: Dhiraj

Xamarin Developer | Author | Blogger | Speaker |

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *