What exactly is Node.js? - Deepstash

Bite‑sized knowledge

to upgrade

your career

Ideas from books, articles & podcasts.

published 9 ideas

What exactly is Node.js?

medium.com

Node.js is a Javascript Runtime built on chrome’s V8 Javascript engine. It uses an event-driven, Non-Blocking I/O model that makes it lightweight and efficient. It can be anything ranging from Reading/Writing local files to making an Http request to an API. I/o takes time and hence blocks other f...

STASHED IN:

1

In the blocking method, user2's data request is not initiated until user1's data is printed to the screen. 

STASHED IN:

1

On the other hand, using a non-blocking request, you can initiate a data request for user2 without waiting for the response to the request for user1. You can initiate both requests in parallel. 

1

STASHED IN:

1

Otherwise, here’s a quick step-by-step explanation of how the JavaScript Event Loop works. 

  • Push main() onto the call stack. 
  • Push console.log onto the call stack. This then runs right away and gets popped. 
  • Push Settimeout onto the stack. Settimeout is a...

STASHED IN:

1

These are libraries built by the awesome community which will solve most of your generic problems. npm (Node package manager) has packages you can use in your apps to make your development faster and efficient. 

STASHED IN:

1

Require does three things: 

  • It loads modules that come bundled with Node.js like file system and HTTP from the Node.js API . 
  • It loads third-party libraries like Express and Mongoose that you install from npm. 
  • It lets you require your own files and modul...

STASHED IN:

1

A Node module is a reusable block of code whose existence does not accidentally impact other code. 

STASHED IN:

1

Something that has happened in our app that we can respond to. There are two types of events in Node. 

  • System Events: C++ core from a library called libuv.. 
  • Custom Events: JavaScript core. 

STASHED IN:

1

We have to do this, don’t we? 

STASHED IN:

1

0 Comments

Discover and save more ideas by creating a

FREE

Deepstash account.

Develop a

reading habit

, save

time

and create an amazing

knowledge library

.

GET THE APP: