Mystery Behind Node js
Jeevan Henry Dsouza
Full Stack Developer | JavaScript | React | MySQL | NodeJS | SpringBoot | Monolith | MicroServices | SaaS | Frontend Development | User Interface Design
What is Node JS ?
Computer only understands 1 & 0 or in other words Machine Code.
Every programming language has its own Engine. The role of this Engine is to convert the code written to Machine Code.
Example: python has a python virtual machine which converts the byte code instructions to Machine Code
In the case of Javascript, the engine is present in the browser . Hence we can only run javascript in the browsers.
Node js is an open-source javascript virtual environment. What it means is Node js made the javascript engine to be now available on the Local Machine
Because of this, not only can we run javascript in browsers but now we can run javascript on our local machine as well. Not only on our local machine, in fact, javascript now can be used on servers as well with the help of Node js.
Hence it is very often referred to as being server -side or backend
Conclusion: Node js is just a run-time environment nothing else.