Node Js Flashcards

1
Q

What does –inspect?

A

Enables the Node.js debugger on localhost:9229.

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

What does —-env-file <path>?</path>

A

Loads environment variables from a .env file.

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

What does –check?

A

Checks the syntax of the script without executing it.

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

What does –require?

A

Preloads a specified module before executing the script (similar to require in code).

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

What does –max-old-space-size=<size>?</size>

A

Sets the maximum memory size for the V8 heap (default: ~1.5 GB)

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

How do you read args from the CLI?

A

process.argv

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

How do you use readline lib?

A

readline.createInterface({input, output}), and readline.question(‘question’, callback)

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