Updates on 106-nodejs-command-line-apps (#6087)
* updates on 106-nodejs-command-line-apps * Apply suggestions from code review Slight style and guideline editting --------- Co-authored-by: dsh <daniel.s.holdsworth@gmail.com>pull/6096/head
parent
5aa67c2e2b
commit
ec175482bd
10 changed files with 22 additions and 11 deletions
@ -1,7 +1,9 @@ |
||||
# Process stdout |
||||
|
||||
The process.stdout property is an inbuilt application programming interface of the process module which is used to send data out of our program. A Writable Stream to stdout. It implements a write() method. |
||||
The `process.stdout` property is an inbuilt application programming interface of the process module which is used to send data out of our program. A Writable Stream to stdout. It implements a `write()` method. |
||||
`console.log()` prints to the `process.stdout.write()` with formatted output or new line. |
||||
|
||||
Visit the following resources to learn more: |
||||
|
||||
- [@official@process.stdout](https://nodejs.org/api/process.html#processstdout) |
||||
- [@article@process.stdout vs console.log](https://stackoverflow.com/questions/4976466/difference-between-process-stdout-write-and-console-log-in-node-js/4984464#4984464) |
||||
|
@ -1,5 +1,7 @@ |
||||
# Command line args |
||||
|
||||
In the CLI (Command Line Interface) world, command line arguments (args) provide additional information to a Node.js program when executed, enabling flexibility and customization. They are managed using `process.argv` in Node.js, or with npm packages like `commander.js` and `yargs` for enhanced argument parsing. |
||||
|
||||
Visit the following resources to learn more: |
||||
|
||||
- [@article@How To Handle Command-line Arguments in Node.js Scripts](https://www.digitalocean.com/community/tutorials/nodejs-command-line-arguments-node-scripts) |
||||
- [@official@Node Documentation](https://nodejs.org/docs/latest/api/process.html#processargv) |
||||
- [@video@Command Line Arguments ](https://youtu.be/5d7eltp0-xm) |
@ -1,4 +1,8 @@ |
||||
# Environment variables |
||||
|
||||
Environment variables in Node.js are key-value pairs used to configure applications based on their runtime environment. Accessed via `process.env`, they enable developers to manage settings, handle sensitive data securely, and adapt application behavior across various deployment environments such as development, testing, and production. Tools like `dotenv` simplify loading environment variables from a `.env` file, enhancing configuration management in Node.js applications. |
||||
|
||||
Visit the following resources to learn more: |
||||
|
||||
- [@official@Node.js Learn environment variables](https://www.digitalocean.com/community/tutorials/nodejs-command-line-arguments-node-scripts) |
||||
- [@article@Node.js Everywhere with Environment Variables!](https://medium.com/the-node-js-collection/making-your-node-js-work-everywhere-with-environment-variables-2da8cdf6e786) |
Loading…
Reference in new issue