Variable "process" Flashcards

(3 cards)

1
Q

Variable “process”

A

It is a built-in object in Node.js that provides information about the current execution process and allows interaction with the operating system. It is always available without the need for import.

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

Variable “process” argv

A

It is an array that contains the command line arguments passed to the script. The first element is the path to the Node.js interpreter, the second is the path to the script executable, and the rest are the arguments specified on the command line.

“node script.js arg1 arg2”:
[‘/path/to/node’, ‘/path/to/script.js’, ‘arg1’, ‘arg2’]

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

Variable “process” env

A

An object containing environment variables.

Used to store sensitive information (e.g. API keys, passwords) and application settings.

Important: Never commit .env to the repository — add it to .gitignore.

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