Node.js Basics Module #51 Flashcards

1
Q

How can you install Node.js?

A

Visit https://nodejs.org/en/download/

Or on a mac using terminal brew install node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the main advantage of using Node.js as a server side language?

A

You don’t have to relearn a new language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What technology runs Google Chrome?

A

Node.js

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Is it common to see the call stack blocked by code from a node library?

A

No. Because A Node.js app is run by a single process, without creating a new thread for every request. Node provides a set of asynchronous I/O primitives in its standard library that will prevent JavaScript code from blocking and generally, libraries in Node.js are written using non-blocking paradigms, making a blocking behavior an exception rather than the normal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens when Node.js needs to perform a network call, or access a database or the filesystem?

A

Instead of blocking the thread Node.js will resume the operations when the response comes back, instead of wasting CPU cycles waiting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly