Node Js Flashcards
1
Q
What does –inspect?
A
Enables the Node.js debugger on localhost:9229.
2
Q
What does —-env-file <path>?</path>
A
Loads environment variables from a .env file.
3
Q
What does –check?
A
Checks the syntax of the script without executing it.
4
Q
What does –require?
A
Preloads a specified module before executing the script (similar to require in code).
5
Q
What does –max-old-space-size=<size>?</size>
A
Sets the maximum memory size for the V8 heap (default: ~1.5 GB)
6
Q
How do you read args from the CLI?
A
process.argv
7
Q
How do you use readline lib?
A
readline.createInterface({input, output}), and readline.question(‘question’, callback)
8
Q
A