Chapter 1: What is NodeJs

Visakh Vijayan
1 min readOct 17, 2021

--

NodeJs is a runtime environment for executing JavaScript. If you are familiar with JS, you will know that we need a browser to execute it. The reason is the same. Every programming language needs to be converted to machine code to be executed by the computer. The browser is the converter here. We call the converter — the engine. For eg. IE uses Chakra, Firefox uses Spider Monkey and chrome uses v8.

The problem was the browsers did not have access to the system resources. You could access the DOM elements but what if you wanted os access or maybe write to a file on the system etc. The browser was limited to accessing just the DOM. Hence Ryan Dahl came up with this exciting idea whereby he made a C++ program that internally called the same v8 engine to execute code. This C++ program with a v8 engine is essentially what NodeJs is. It’s a lot more complex than it sounds but for beginners this is it. With that done you were free to access a lot of system resources via functions which are known as modules. So getting a system resource was essentially just a function call now. Wow!

--

--

Visakh Vijayan
Visakh Vijayan

Written by Visakh Vijayan

Techie from Kerala, India. Days are for coding, nights for weaving tales of tech, travel, and finance. Join me in exploring this multifaceted journey

No responses yet