Writing Hello World in Node.js - Deepstash
Introduction to Web 3.0

Learn more about product with this collection

The differences between Web 2.0 and Web 3.0

The future of the internet

Understanding the potential of Web 3.0

Introduction to Web 3.0

Discover 36 similar ideas in

It takes just

6 mins to read

Writing Hello World in Node.js

We have to do this, don’t we? 

5

68 reads

MORE IDEAS ON THIS

Events

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. 

6

69 reads

The JavaScript event loop

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 Node API.
  • ...

7

72 reads

Node Modules

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

6

51 reads

Require

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 modularize the proje...

6

53 reads

Why Node.js?

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...

6

93 reads

Non-blocking I/O

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. 

6

64 reads

Blocking I/O

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

6

92 reads

npm

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. 

6

55 reads

CURATED FROM

CURATED BY

apron

Recruitment consultant

Related collections

More like this

Living In The World Of "Good Enough"

The reason that most people don’t possess extraordinary physical capabilities isn’t because they don’t have the capacity for them, but rather because they’re satisfied to live in the comfortable rut of homeostasis and never do the work that is required to get out of it.

Writing as self-discipline

The reason why we don’t do anything useful with our time is that we lack self-discipline.

But when you write every day, you strengthen your discipline. And you can transfer that better self-discipline to achieve anything in life.

Unfree in a Free World

Unfree in a Free World

We all are unfree in a free world. We do things we are obliged to do. We spend money on things we are told by society to spend on.

We are responsible for our lives, while we mistakenly think that our parents, siblings, teachers, friends or other outsiders are responsible for th...

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving & library

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Personalized recommendations

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates