Why and when to use Node.js?

0 votes
how to decide when to use Node.js?
Jun 14 in Others by shubham
• 6,890 points
66 views

1 answer to this question.

0 votes

The major reason why they are going for Node.js is because

  • It can be used both in front-end and back-end
  • It gives the runtime for the JavaScript we don't need to go for the browser every time to execute the codes 
  • It works Asynchronously and in a non-blocking manner. For Example: if you get three requests in which if your first request would 10 sec, the second request would take 2 sec and the third request would take 5 sec. The execution order of your program would be 2, 3 and 1 from this you can understand that it works Asynchronously

           And here as the 2 request doesn't wait for the first request to complete, it is working in a Non-Blocking manner. Thus making             it work faster.

  • It has the largest community called NPM where developers can share their packages and if you want the same packages in your application, you have to just install it to use it.
  • It can be built and deployed on various cross platforms like Windows, MAC, and Linux
  • High scalable because of the event mechanism
  • Single threaded 
  • And the major reason why we have to learn Node.js is that most of the companies use Node.js, so there is a large number of job opportunities too.

Use Node.js when 

  • you need to have a persistent connection between the browser and server
  • online games
  • collaboration tools
  • Chat rooms
  • Anything where what one user does with the application needs to be seen by other users immediately, without a page refresh

To know more about Node.js:https://www.edureka.co/blog/nodejs-tutorial/

answered Jun 14 by sunshine
• 1,240 points

edited Jun 14 by sunshine

Related Questions In Others

0 votes
0 answers

How to communicate gRPC example working with Node.js?

Hi Guys, I am working as a Node.js ...READ MORE

Dec 5, 2018 in Others by camillelola
• 140 points
374 views
+1 vote
1 answer

Why is the result distorted when we use threads?

A thread is basically a part of ...READ MORE

answered Jun 6 in Others by Nisa
• 1,090 points
34 views
0 votes
1 answer

How do I start studying Node.JS to create a restful API?

Node.js is an open source server environment ...READ MORE

answered Jun 10 in Others by ArchanaNagur
• 2,270 points
49 views
0 votes
1 answer

What is use of Babel in Node.js ?

Node.js is a runtime environment  which let us ...READ MORE

answered Jul 2 in Others by ArchanaNagur
• 2,270 points
114 views
0 votes
1 answer

how to safely deploy npm install without it causing inconsistencies?

The recent versions on npm generates a ...READ MORE

answered Apr 11, 2018 in DevOps on Cloud by DareDev
• 6,810 points
70 views
0 votes
1 answer

Unable to request channel creation using Rest Api

I'd recommend taking a look at the ordering ...READ MORE

answered Jul 16, 2018 in Blockchain by Perry
• 17,020 points
142 views
0 votes
1 answer

Why do we use Body-parser in Node.js?

For understanding this first you need to ...READ MORE

answered May 20 in Others by sunshine
• 1,240 points
252 views
+1 vote
1 answer

what is the difference between error and stderr in Node.js?

Error is an object created by Node.js to handle ...READ MORE

answered Jul 4 in Others by sunshine
• 1,240 points
68 views