NodeJS is a JavaScript runtime environment which is built on the Google’s open-source V8 JavaScript engine. Now, what does that actually mean? Let’s explain…
Any browser would understand HTML, CSS and JavaScript on the front-end. Whatever you write, whether it’s pure JavaScript or any of it’s libraries or frameworks like bootstrap, React or Angular, it’s all JS which runs on the browser. So in this case, the browser you’re using is the JavaScript runtime which executes all your code.
Now, let’s say you want to write JavaScript code anywhere outside the browser. Can you possibly do that? Yes, you can! It can be done with NodeJS. So that way, NodeJS is a JavaScript runtime environment wherein you can write and execute JavaScript code outside of a traditional browser. On the other hand, V8 is the engine in which the JavaScript code is parsed and executed.
Using NodeJS we can increase the functionality of JavaScript manifold. The main possibility of NodeJS is that it can be used to build web servers. We can use it specifically to create back-end applications and servers. We can also use it to create fast and scalable apps like data streaming services and real-time chatting apps. However, for a developer, using the same programming language across the stack i.e., for the front and back-end is very convenient. An entire end-to end app can be build just in JavaScript using NodeJS. For this, we have NPM (Node Package Manager) which is an entire library of open-source packages to be used with NodeJS contributed by the developer community which makes your life really easy as a developer.