The major reason why they are going for Node.js is because
- It can be used both in front-end and back-end
- 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/